Revision 4b74fe1f linux-user/main.c
b/linux-user/main.c | ||
---|---|---|
128 | 128 |
/* Zero out image_info */ |
129 | 129 |
memset(info, 0, sizeof(struct image_info)); |
130 | 130 |
|
131 |
if(elf_exec(filename, argv+1, environ, regs, info) != 0) {
|
|
131 |
if(elf_exec(filename, argv+optind, environ, regs, info) != 0) {
|
|
132 | 132 |
printf("Error loading %s\n", filename); |
133 | 133 |
exit(1); |
134 | 134 |
} |
135 | 135 |
|
136 |
#if 0
|
|
137 |
printf("start_brk 0x%08lx\n" , info->start_brk);
|
|
138 |
printf("end_code 0x%08lx\n" , info->end_code);
|
|
139 |
printf("start_code 0x%08lx\n" , info->start_code);
|
|
140 |
printf("end_data 0x%08lx\n" , info->end_data);
|
|
141 |
printf("start_stack 0x%08lx\n" , info->start_stack);
|
|
142 |
printf("brk 0x%08lx\n" , info->brk);
|
|
143 |
printf("esp 0x%08lx\n" , regs->esp);
|
|
144 |
printf("eip 0x%08lx\n" , regs->eip);
|
|
145 |
#endif
|
|
136 |
if (loglevel) {
|
|
137 |
fprintf(logfile, "start_brk 0x%08lx\n" , info->start_brk);
|
|
138 |
fprintf(logfile, "end_code 0x%08lx\n" , info->end_code);
|
|
139 |
fprintf(logfile, "start_code 0x%08lx\n" , info->start_code);
|
|
140 |
fprintf(logfile, "end_data 0x%08lx\n" , info->end_data);
|
|
141 |
fprintf(logfile, "start_stack 0x%08lx\n" , info->start_stack);
|
|
142 |
fprintf(logfile, "brk 0x%08lx\n" , info->brk);
|
|
143 |
fprintf(logfile, "esp 0x%08lx\n" , regs->esp);
|
|
144 |
fprintf(logfile, "eip 0x%08lx\n" , regs->eip);
|
|
145 |
}
|
|
146 | 146 |
|
147 | 147 |
target_set_brk((char *)info->brk); |
148 | 148 |
syscall_init(); |
Also available in: Unified diff