Revision 3a0c6c4a
b/linux-user/syscall.c | ||
---|---|---|
756 | 756 |
abi_long mapped_addr; |
757 | 757 |
int new_alloc_size; |
758 | 758 |
|
759 |
DEBUGF_BRK("do_brk(%#010x) -> ", new_brk);
|
|
759 |
DEBUGF_BRK("do_brk(" TARGET_ABI_FMT_lx ") -> ", new_brk);
|
|
760 | 760 |
|
761 | 761 |
if (!new_brk) { |
762 |
DEBUGF_BRK("%#010x (!new_brk)\n", target_brk);
|
|
762 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (!new_brk)\n", target_brk);
|
|
763 | 763 |
return target_brk; |
764 | 764 |
} |
765 | 765 |
if (new_brk < target_original_brk) { |
766 |
DEBUGF_BRK("%#010x (new_brk < target_original_brk)\n", target_brk); |
|
766 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (new_brk < target_original_brk)\n", |
|
767 |
target_brk); |
|
767 | 768 |
return target_brk; |
768 | 769 |
} |
769 | 770 |
|
... | ... | |
776 | 777 |
memset(g2h(target_brk), 0, new_brk - target_brk); |
777 | 778 |
} |
778 | 779 |
target_brk = new_brk; |
779 |
DEBUGF_BRK("%#010x (new_brk <= brk_page)\n", target_brk);
|
|
780 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (new_brk <= brk_page)\n", target_brk);
|
|
780 | 781 |
return target_brk; |
781 | 782 |
} |
782 | 783 |
|
... | ... | |
803 | 804 |
|
804 | 805 |
target_brk = new_brk; |
805 | 806 |
brk_page = HOST_PAGE_ALIGN(target_brk); |
806 |
DEBUGF_BRK("%#010x (mapped_addr == brk_page)\n", target_brk); |
|
807 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (mapped_addr == brk_page)\n", |
|
808 |
target_brk); |
|
807 | 809 |
return target_brk; |
808 | 810 |
} else if (mapped_addr != -1) { |
809 | 811 |
/* Mapped but at wrong address, meaning there wasn't actually |
... | ... | |
811 | 813 |
*/ |
812 | 814 |
target_munmap(mapped_addr, new_alloc_size); |
813 | 815 |
mapped_addr = -1; |
814 |
DEBUGF_BRK("%#010x (mapped_addr != -1)\n", target_brk);
|
|
816 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (mapped_addr != -1)\n", target_brk);
|
|
815 | 817 |
} |
816 | 818 |
else { |
817 |
DEBUGF_BRK("%#010x (otherwise)\n", target_brk);
|
|
819 |
DEBUGF_BRK(TARGET_ABI_FMT_lx " (otherwise)\n", target_brk);
|
|
818 | 820 |
} |
819 | 821 |
|
820 | 822 |
#if defined(TARGET_ALPHA) |
Also available in: Unified diff