|
From: | Marcelo Spohn |
Subject: | Execution continues after a "Cannot access memory at address 0x......" message |
Date: | Thu, 31 Jan 2002 20:38:48 -0200 |
Hello,I've spent quite a good number of hours trying to figure this one out unsuccessfully.
This is the trace of gdb's execution:
(gdb) run
Starting program: bubbles
Cannot access memory at address 0x2f6c6962.
(gdb) bt
#0 0x7fbbaa48 in ?? ()
#1 0x7fbb4310 in ?? ()
#2 0x7fbbedc4 in ?? ()
#3 0x7fbbee5c in ?? ()
#4 0x7fbbefa4 in ?? ()
#5 0x7f6c9844 in SO_per_src_lookup () from /usr/lib/libc.so.1
#6 0x7f6c8108 in nss_get_backend_u () from /usr/lib/libc.so.1
#7 0x7f6c8bd0 in nss_search () from /usr/lib/libc.so.1
#8 0x7f665740 in getprotobyname_r () from /usr/lib/libsocket.so.1
#9 0x4fbac in task_get_proto (tf=0x0, name=0x112530 "icmp",
default_proto=1724904) at task.c:6298
#10 0xd7ba0 in icmp_init () at icmp.c:723
#11 0x49480 in task_proto_inits () at task.c:3103
#12 0x5142c in main (argc=2, argv=0xffbefd84) at task.c:7301
(gdb) info frame
Stack level 0, frame at 0xffbeedb8:
pc = 0xff3baa48; saved pc 0xff3b4310
called by frame at 0xffbef258
Arglist at 0xffbeedb8, args:
Locals at 0xffbeedb8,
(gdb) list
7059 }
7060
7061
7062 /*
7063 * Initialization
processing
7064 */
7065 int
7066 main(int argc, char **argv)
7067 {
7068 char *name = argv[0];
(gdb) continue
Continuing.
Two weird things are happening here:
1) GDB complains that the user process is trying to access an invalid
address,
but allows the process to continue its execution
(normally) when I type in the bgp command continue.
2) The output of the list command is showing part of the code
that is around the main function (program
counter 0x5142c), which does not
correspond to the current stack frame.
I suppose this is a bug in GDB, isn't it?
Many thanks,
Marcelo
[Prev in Thread] | Current Thread | [Next in Thread] |