Skip to contentSkip to conversation

Debugging

Qemu-devel Tom Musgrove 2 participants 2 messages Feb 25, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I have some questions on debugging - here is exactly what I'm doing, might be of use to other newbies with gdb

# cd qemu
# gdb i386-softmmu/qemu
# break main
# run  /Users/tom/Desktop/linux.img -d
# step

okay, I keep stepping

I get to line 981 setvbuf(logfile,NULL, _IOLBF, 0);

Then after the next step, it prints out tlb_flush:

with a ton of apparently memorry addresses and such (I'll include as attachments runs from both freedos.img and linux.img).

then finally it prints

Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00020b28 in cpu_x86_exec (env1=0x1f) at /Users/tom/darwine/related/qemu/exec-all.h:284
284 if (!tb->jmp_next[n]) {

any further attempts to step repeat the above message

This is off of the Darwin porting branch set up by Pierre.

Tom M.

_________________________________________________________________
Say �good-bye� to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/

Breakpoint 1, main (argc=3, argv=0xbffffc48) at /Users/tom/darwine/related/qemu/vl.c:3301
3301 initrd_filename = NULL;
(gdb) step
3285 {
(gdb) step
main (argc=3, argv=0xbffffc48) at /Users/tom/darwine/related/qemu/vl.c:3295
3295 DisplayState *ds = &display_state;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3285 {
(gdb) step
3295 DisplayState *ds = &display_state;
(gdb) step
3303 fd_filename[i] = NULL;
(gdb) step
3302 for(i = 0; i < MAX_FD; i++)
(gdb) step
3303 fd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3306 ram_size = 32 * 1024 * 1024;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3311 use_gdbstub = 0;
(gdb) step
3306 ram_size = 32 * 1024 * 1024;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
pstrcpy (buf=0x1f2cd0 "", buf_size=1024, str=0x4f3e8 "/etc/qemu-ifup") at /Users/tom/darwine/related/qemu/vl.c:249
249 if (buf_size <= 0)
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
258 *q = '\0';
(gdb) step
259 }
(gdb) step
main (argc=3, argv=0xbffffc38) at /Users/tom/darwine/related/qemu/vl.c:3314
3314 nographic = 0;
(gdb) step
3316 kernel_cmdline = "";
(gdb) step
3314 nographic = 0;
(gdb) step
3316 kernel_cmdline = "";
(gdb) step
3312 gdbstub_port = DEFAULT_GDBSTUB_PORT;
(gdb) step
3313 snapshot = 0;
(gdb) step
3314 nographic = 0;
(gdb) step
3315 kernel_filename = NULL;
(gdb) step
3318 c = getopt_long_only(argc, argv, "hm:dn:sp:L:",
long_options, &long_index);
(gdb) step
3319 if (c == -1)
(gdb) step
3321 switch(c) {
(gdb) step
3413 cpu_set_log(CPU_LOG_ALL);
(gdb) step
cpu_set_log (log_flags=1) at /Users/tom/darwine/related/qemu/exec.c:968
968 if (loglevel && !logfile) {
(gdb) step
966 {
(gdb) step
967 loglevel = log_flags;
(gdb) step
966 {
(gdb) step
cpu_set_log (log_flags=1) at /Users/tom/darwine/related/qemu/exec.c:967
967 loglevel = log_flags;
(gdb) step
968 if (loglevel && !logfile) {
(gdb) step
969 logfile = fopen(logfilename, "w");
(gdb) step
970 if (!logfile) {
(gdb) step
969 logfile = fopen(logfilename, "w");
(gdb) step
970 if (!logfile) {
(gdb) step
981 setvbuf(logfile, NULL, _IOLBF, 0);
(gdb) step
tlb_flush:
tlb_set_page: vaddr=0x000ff000 paddr=0x000ff000 prot=3 u=0 c=0 smmu=1 pd=0x000ff010
calling gen_func 0x2091f0
[0x3c4000b8]
[0x8302c250]
[0x3c4000b8]
entering gen_func 0x2091f0
returning gen_func 0x2091f0
tlb_set_page: vaddr=0x000fe000 paddr=0x000fe000 prot=3 u=0 c=0 smmu=1 pd=0x000fe010
calling gen_func 0x209230
[0x3b000000]
[0x801b0000]
[0x5702043e]
entering gen_func 0x209230
cmos: read index=0x0f val=0x00
cmos: write index=0x0f val=0x00
returning gen_func 0x209230
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x209520
[0x801b0024]
[0x540005ea]
[0x901b0024]
entering gen_func 0x209520
returning gen_func 0x209520
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x2095e0
[0x831b0000]
[0x3c4000b8]
[0x5700043e]
entering gen_func 0x2095e0
returning gen_func 0x2095e0
calling gen_func 0x209620
[0x3c4000b8]
[0x8302c250]
[0x801b0004]
entering gen_func 0x209620
tlb_set_page: vaddr=0x00000000 paddr=0x00000000 prot=3 u=0 c=0 smmu=1 pd=0x00000000
returning gen_func 0x209620
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
calling gen_func 0x209860
[0x3c4000b8]
[0x8302c250]
[0x835b0010]
entering gen_func 0x209860
tlb_set_page: vaddr=0x0000f000 paddr=0x0000f000 prot=3 u=0 c=0 smmu=1 pd=0x0000f000
returning gen_func 0x209860
tlb_set_page: vaddr=0x000f0000 paddr=0x000f0000 prot=3 u=0 c=0 smmu=1 pd=0x000f0010
calling gen_func 0x209900
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x209900
returning gen_func 0x209900
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x209c10
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x209c10
returning gen_func 0x209c10
calling gen_func 0x209e20
[0x3c4000b8]
[0x8042c250]
[0x54422036]
entering gen_func 0x209e20
returning gen_func 0x209e20
calling gen_func 0x209ee0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x209ee0
returning gen_func 0x209ee0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a190
[0x48000004]
[0x3c4000b8]
[0x8042c254]
entering gen_func 0x20a190
returning gen_func 0x20a190
calling gen_func 0x20a1b0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20a1b0
returning gen_func 0x20a1b0
calling gen_func 0x20a3e0
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x20a3e0
tlb_set_page: vaddr=0x000fd000 paddr=0x000fd000 prot=3 u=0 c=0 smmu=1 pd=0x000fd010
returning gen_func 0x20a3e0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a980
[0x3c4000b8]
[0x8322c250]
[0x831b0010]
entering gen_func 0x20a980
returning gen_func 0x20a980
calling gen_func 0x20aa80
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20aa80
returning gen_func 0x20aa80
calling gen_func 0x20ab70
[0x3c4000b8]
[0x8302c250]
[0x801b0000]
entering gen_func 0x20ab70
returning gen_func 0x20ab70
calling gen_func 0x20acc0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20acc0
returning gen_func 0x20acc0
calling gen_func 0x20a3e0
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x20a3e0
tlb_set_page: vaddr=0x0000d000 paddr=0x0000d000 prot=3 u=0 c=0 smmu=1 pd=0x0000d000
returning gen_func 0x20a3e0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a980
[0x3c4000b8]
[0x8322c250]
[0x831b0010]
entering gen_func 0x20a980
returning gen_func 0x20a980

Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00020b28 in cpu_x86_exec (env1=0x1f) at /Users/tom/darwine/related/qemu/exec-all.h:284
284 if (!tb->jmp_next[n]) {

iMac:~/darwine/related/qemu] tom% gdb i386-softmmu/qemu (gdb) break main
Breakpoint 1 at 0x7074: file /Users/tom/darwine/related/qemu/vl.c, line 3301.
(gdb) run /Users/tom/Desktop/linux.img -d
Starting program: /Users/tom/darwine/related/qemu/i386-softmmu/qemu /Users/tom/Desktop/linux.img -d
Reading symbols for shared libraries . done

Breakpoint 1, main (argc=3, argv=0xbffffc4c) at /Users/tom/darwine/related/qemu/vl.c:3301
3301 initrd_filename = NULL;
(gdb) step
3285 {
(gdb) step
main (argc=3, argv=0xbffffc4c) at /Users/tom/darwine/related/qemu/vl.c:3295
3295 DisplayState *ds = &display_state;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3285 {
(gdb) step
3295 DisplayState *ds = &display_state;
(gdb) step
3303 fd_filename[i] = NULL;
(gdb) step
3302 for(i = 0; i < MAX_FD; i++)
(gdb) step
3303 fd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3305 hd_filename[i] = NULL;
(gdb) step
3304 for(i = 0; i < MAX_DISKS; i++)
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3306 ram_size = 32 * 1024 * 1024;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
3307 vga_ram_size = VGA_RAM_SIZE;
(gdb) step
3311 use_gdbstub = 0;
(gdb) step
3306 ram_size = 32 * 1024 * 1024;
(gdb) step
3309 pstrcpy(network_script, sizeof(network_script),
DEFAULT_NETWORK_SCRIPT);
(gdb) step
pstrcpy (buf=0x1f2cd0 "", buf_size=1024, str=0x4f3e8 "/etc/qemu-ifup") at /Users/tom/darwine/related/qemu/vl.c:249
249 if (buf_size <= 0)
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
256 *q++ = c;
(gdb) step
252 for(;;) {
(gdb) step
253 c = *str++;
(gdb) step
254 if (c == 0 || q >= buf + buf_size - 1)
(gdb) step
258 *q = '\0';
(gdb) step
259 }
(gdb) step
main (argc=3, argv=0xbffffc3c) at /Users/tom/darwine/related/qemu/vl.c:3314
3314 nographic = 0;
(gdb) step
3316 kernel_cmdline = "";
(gdb) step
3314 nographic = 0;
(gdb) step
3316 kernel_cmdline = "";
(gdb) step
3312 gdbstub_port = DEFAULT_GDBSTUB_PORT;
(gdb) step
3313 snapshot = 0;
(gdb) step
3314 nographic = 0;
(gdb) step
3315 kernel_filename = NULL;
(gdb) step
3318 c = getopt_long_only(argc, argv, "hm:dn:sp:L:",
long_options, &long_index);
(gdb) step
3319 if (c == -1)
(gdb) step
3321 switch(c) {
(gdb) step
3413 cpu_set_log(CPU_LOG_ALL);
(gdb) step
cpu_set_log (log_flags=1) at /Users/tom/darwine/related/qemu/exec.c:968
968 if (loglevel && !logfile) {
(gdb) step
966 {
(gdb) step
967 loglevel = log_flags;
(gdb) step
966 {
(gdb) step
cpu_set_log (log_flags=1) at /Users/tom/darwine/related/qemu/exec.c:967
967 loglevel = log_flags;
(gdb) step
968 if (loglevel && !logfile) {
(gdb) step
969 logfile = fopen(logfilename, "w");
(gdb) step
970 if (!logfile) {
(gdb) step
969 logfile = fopen(logfilename, "w");
(gdb) step
970 if (!logfile) {
(gdb) step
981 setvbuf(logfile, NULL, _IOLBF, 0);
(gdb) step
tlb_flush:
tlb_set_page: vaddr=0x000ff000 paddr=0x000ff000 prot=3 u=0 c=0 smmu=1 pd=0x000ff010
calling gen_func 0x2091f0
[0x3c4000b8]
[0x8302c250]
[0x3c4000b8]
entering gen_func 0x2091f0
returning gen_func 0x2091f0
tlb_set_page: vaddr=0x000fe000 paddr=0x000fe000 prot=3 u=0 c=0 smmu=1 pd=0x000fe010
calling gen_func 0x209230
[0x3b000000]
[0x801b0000]
[0x5702043e]
entering gen_func 0x209230
cmos: read index=0x0f val=0x00
cmos: write index=0x0f val=0x00
returning gen_func 0x209230
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x209520
[0x801b0024]
[0x540005ea]
[0x901b0024]
entering gen_func 0x209520
returning gen_func 0x209520
calling gen_func 0x2095e0
[0x831b0000]
[0x3c4000b8]
[0x5700043e]
entering gen_func 0x2095e0
returning gen_func 0x2095e0
calling gen_func 0x209620
[0x3c4000b8]
[0x8302c250]
[0x801b0004]
entering gen_func 0x209620
tlb_set_page: vaddr=0x00000000 paddr=0x00000000 prot=3 u=0 c=0 smmu=1 pd=0x00000000
returning gen_func 0x209620
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
calling gen_func 0x209760
[0xa01b0006]
[0x2f800000]
[0x409e0024]
entering gen_func 0x209760
returning gen_func 0x209760
calling gen_func 0x209860
[0x3c4000b8]
[0x8302c250]
[0x835b0010]
entering gen_func 0x209860
tlb_set_page: vaddr=0x0000f000 paddr=0x0000f000 prot=3 u=0 c=0 smmu=1 pd=0x0000f000
returning gen_func 0x209860
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
tlb_set_page: vaddr=0x000f0000 paddr=0x000f0000 prot=3 u=0 c=0 smmu=1 pd=0x000f0010
calling gen_func 0x209900
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x209900
returning gen_func 0x209900
calling gen_func 0x209c10
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x209c10
returning gen_func 0x209c10
calling gen_func 0x209e20
[0x3c4000b8]
[0x8042c250]
[0x54422036]
entering gen_func 0x209e20
returning gen_func 0x209e20
calling gen_func 0x209ee0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x209ee0
returning gen_func 0x209ee0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a190
[0x48000004]
[0x3c4000b8]
[0x8042c254]
entering gen_func 0x20a190
returning gen_func 0x20a190
calling gen_func 0x20a1b0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20a1b0
returning gen_func 0x20a1b0
calling gen_func 0x20a3e0
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x20a3e0
tlb_set_page: vaddr=0x000fd000 paddr=0x000fd000 prot=3 u=0 c=0 smmu=1 pd=0x000fd010
returning gen_func 0x20a3e0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a980
[0x3c4000b8]
[0x8322c250]
[0x831b0010]
entering gen_func 0x20a980
returning gen_func 0x20a980
calling gen_func 0x20aa80
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20aa80
returning gen_func 0x20aa80
calling gen_func 0x20ab70
[0x3c4000b8]
[0x8302c250]
[0x801b0000]
entering gen_func 0x20ab70
returning gen_func 0x20ab70
calling gen_func 0x20acc0
[0x835b0014]
[0x3c4000b8]
[0x8042c250]
entering gen_func 0x20acc0
returning gen_func 0x20acc0
pic_set_irq: irq=0 level=1
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
pic_set_irq: irq=0 level=0
pic0: imr=0 irr=1 padd=0
pic1: imr=0 irr=0 padd=0
pic: cpu_interrupt req=0
calling gen_func 0x20a3e0
[0x831b0014]
[0x835b0010]
[0x3b5afffe]
entering gen_func 0x20a3e0
tlb_set_page: vaddr=0x0000d000 paddr=0x0000d000 prot=3 u=0 c=0 smmu=1 pd=0x0000d000
returning gen_func 0x20a3e0
calling gen_func 0x20a980
[0x3c4000b8]
[0x8322c250]
[0x831b0010]
entering gen_func 0x20a980
returning gen_func 0x20a980

Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00020b28 in cpu_x86_exec (env1=0x1f) at /Users/tom/darwine/related/qemu/exec-all.h:284
284 if (!tb->jmp_next[n]) {

#1 lore raw

Ahh yes, I have corrected that bug. There was an attempt to allocate too much memory - search for valloc() in vl.c and you will see the problem right away. Just make it allocate the desired amount of physical_ram (remove the multiplier times blocksize).

-Daniel

Quoted 36 lines · Tom Musgrove

Hi,

I have some questions on debugging - here is exactly what I'm doing, might be of use to other newbies with gdb

# cd qemu
# gdb i386-softmmu/qemu
# break main
# run  /Users/tom/Desktop/linux.img -d
# step

okay, I keep stepping

I get to line 981 setvbuf(logfile,NULL, _IOLBF, 0);

Then after the next step, it prints out tlb_flush:

with a ton of apparently memorry addresses and such (I'll include as attachments runs from both freedos.img and linux.img).

then finally it prints

Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00020b28 in cpu_x86_exec (env1=0x1f) at /Users/tom/darwine/related/qemu/exec-all.h:284
284 if (!tb->jmp_next[n]) {

any further attempts to step repeat the above message

This is off of the Darwin porting branch set up by Pierre.

Tom M.

_________________________________________________________________
Say “good-bye” to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/
<freedos debug.txt><linux debug.txt>_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel