diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-03 23:23:09 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-03 23:23:09 +0000 |
commit | 4b74fe1f0013c622693b26141c0ed031a284a45a (patch) | |
tree | 4dfd2b0791246a7f1793e5caba05356d940314a2 /linux-user | |
parent | 586314f2aa62990dead8144e780c4c8c498eece6 (diff) | |
download | qemu-4b74fe1f0013c622693b26141c0ed031a284a45a.tar.gz qemu-4b74fe1f0013c622693b26141c0ed031a284a45a.tar.bz2 qemu-4b74fe1f0013c622693b26141c0ed031a284a45a.zip |
many fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@19 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index cdd118f369..356d980f04 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -128,21 +128,21 @@ int main(int argc, char **argv) /* Zero out image_info */ memset(info, 0, sizeof(struct image_info)); - if(elf_exec(filename, argv+1, environ, regs, info) != 0) { + if(elf_exec(filename, argv+optind, environ, regs, info) != 0) { printf("Error loading %s\n", filename); exit(1); } -#if 0 - printf("start_brk 0x%08lx\n" , info->start_brk); - printf("end_code 0x%08lx\n" , info->end_code); - printf("start_code 0x%08lx\n" , info->start_code); - printf("end_data 0x%08lx\n" , info->end_data); - printf("start_stack 0x%08lx\n" , info->start_stack); - printf("brk 0x%08lx\n" , info->brk); - printf("esp 0x%08lx\n" , regs->esp); - printf("eip 0x%08lx\n" , regs->eip); -#endif + if (loglevel) { + fprintf(logfile, "start_brk 0x%08lx\n" , info->start_brk); + fprintf(logfile, "end_code 0x%08lx\n" , info->end_code); + fprintf(logfile, "start_code 0x%08lx\n" , info->start_code); + fprintf(logfile, "end_data 0x%08lx\n" , info->end_data); + fprintf(logfile, "start_stack 0x%08lx\n" , info->start_stack); + fprintf(logfile, "brk 0x%08lx\n" , info->brk); + fprintf(logfile, "esp 0x%08lx\n" , regs->esp); + fprintf(logfile, "eip 0x%08lx\n" , regs->eip); + } target_set_brk((char *)info->brk); syscall_init(); |