This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: message: "Cannot find bounds of current function"
- From: Peter Barada <peter at the-baradas dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 25 Mar 2005 12:31:11 -0500 (EST)
- Subject: Re: message: "Cannot find bounds of current function"
- References: <BAY13-F41B6C4FB3F3107B427AF6DD8410@phx.gbl>
>what does that message mean?
>i have start a executeable remotely via the command:
>gdbserver 192.168.0.10:1234 ./stubs
>
>
>(gdb) file /tmp/stubs/src/stubs
>Reading symbols from /tmp/stubs/src/stubs...done.
>(gdb) target extended-remote 192.168.0.10:1234
>Remote debugging using 192.168.0.10:1234
>0x400009c0 in ?? ()
>(gdb) break main
>Breakpoint 1 at 0x8048338: file main.c, line 8.
>(gdb) n
>Cannot find I bounds of current function
>(gdb)
You *really* should read the documentation a bit deeper.
This is because when you attached to gdbserver, the process under
debug has not completed the C start-up code.
If you had 'objdump -h' the program you are trying to debug, you
would have found that 0x400009c0 is is *way* outside the bounds of the
program.
If instead you tried:
(gdb) target extended-remote 192.168.0.10:1234
Remote debugging using 192.168.0.10:1234
0x400009c0 in ?? ()
(gdb) break main
Breakpoint 1 at 0x8048338: file main.c, line 8.
(gdb) c
Breakpoint 1, main ( ... )
at /.../main.c:8
(gdb)
At this point the program counters is *inside* your program and gdb
can match up the program counter to source code.
--
Peter Barada
peter@the-baradas.com