Commit 2e77eac62db82164e4c6200c928a315cd86bf7c4

Authored by blueswir1
1 parent 48927926

Fix user emulator breakage, based on patch by Riku Voipio

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6371 c046a42c-6fe2-441c-8c8c-71466251a162
bsd-user/main.c
... ... @@ -533,19 +533,21 @@ int main(int argc, char **argv)
533 533  
534 534 free(target_environ);
535 535  
536   - log_page_dump();
537   -
538   - qemu_log("start_brk 0x" TARGET_ABI_FMT_lx "\n", info->start_brk);
539   - qemu_log("end_code 0x" TARGET_ABI_FMT_lx "\n", info->end_code);
540   - qemu_log("start_code 0x" TARGET_ABI_FMT_lx "\n",
541   - info->start_code);
542   - qemu_log("start_data 0x" TARGET_ABI_FMT_lx "\n",
543   - info->start_data);
544   - qemu_log("end_data 0x" TARGET_ABI_FMT_lx "\n", info->end_data);
545   - qemu_log("start_stack 0x" TARGET_ABI_FMT_lx "\n",
546   - info->start_stack);
547   - qemu_log("brk 0x" TARGET_ABI_FMT_lx "\n", info->brk);
548   - qemu_log("entry 0x" TARGET_ABI_FMT_lx "\n", info->entry);
  536 + if (qemu_log_enabled()) {
  537 + log_page_dump();
  538 +
  539 + qemu_log("start_brk 0x" TARGET_ABI_FMT_lx "\n", info->start_brk);
  540 + qemu_log("end_code 0x" TARGET_ABI_FMT_lx "\n", info->end_code);
  541 + qemu_log("start_code 0x" TARGET_ABI_FMT_lx "\n",
  542 + info->start_code);
  543 + qemu_log("start_data 0x" TARGET_ABI_FMT_lx "\n",
  544 + info->start_data);
  545 + qemu_log("end_data 0x" TARGET_ABI_FMT_lx "\n", info->end_data);
  546 + qemu_log("start_stack 0x" TARGET_ABI_FMT_lx "\n",
  547 + info->start_stack);
  548 + qemu_log("brk 0x" TARGET_ABI_FMT_lx "\n", info->brk);
  549 + qemu_log("entry 0x" TARGET_ABI_FMT_lx "\n", info->entry);
  550 + }
549 551  
550 552 target_set_brk(info->brk);
551 553 syscall_init();
... ...
linux-user/main.c
... ... @@ -2394,19 +2394,21 @@ int main(int argc, char **argv, char **envp)
2394 2394  
2395 2395 free(target_environ);
2396 2396  
2397   - log_page_dump();
2398   -
2399   - qemu_log("start_brk 0x" TARGET_ABI_FMT_lx "\n", info->start_brk);
2400   - qemu_log("end_code 0x" TARGET_ABI_FMT_lx "\n", info->end_code);
2401   - qemu_log("start_code 0x" TARGET_ABI_FMT_lx "\n",
2402   - info->start_code);
2403   - qemu_log("start_data 0x" TARGET_ABI_FMT_lx "\n",
2404   - info->start_data);
2405   - qemu_log("end_data 0x" TARGET_ABI_FMT_lx "\n", info->end_data);
2406   - qemu_log("start_stack 0x" TARGET_ABI_FMT_lx "\n",
2407   - info->start_stack);
2408   - qemu_log("brk 0x" TARGET_ABI_FMT_lx "\n", info->brk);
2409   - qemu_log("entry 0x" TARGET_ABI_FMT_lx "\n", info->entry);
  2397 + if (qemu_log_enabled()) {
  2398 + log_page_dump();
  2399 +
  2400 + qemu_log("start_brk 0x" TARGET_ABI_FMT_lx "\n", info->start_brk);
  2401 + qemu_log("end_code 0x" TARGET_ABI_FMT_lx "\n", info->end_code);
  2402 + qemu_log("start_code 0x" TARGET_ABI_FMT_lx "\n",
  2403 + info->start_code);
  2404 + qemu_log("start_data 0x" TARGET_ABI_FMT_lx "\n",
  2405 + info->start_data);
  2406 + qemu_log("end_data 0x" TARGET_ABI_FMT_lx "\n", info->end_data);
  2407 + qemu_log("start_stack 0x" TARGET_ABI_FMT_lx "\n",
  2408 + info->start_stack);
  2409 + qemu_log("brk 0x" TARGET_ABI_FMT_lx "\n", info->brk);
  2410 + qemu_log("entry 0x" TARGET_ABI_FMT_lx "\n", info->entry);
  2411 + }
2410 2412  
2411 2413 target_set_brk(info->brk);
2412 2414 syscall_init();
... ...