This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB does not stop at assembly code address
- From: deffo at gmx dot de
- To: qiyaoltc at gmail dot com
- Cc: gdb at sourceware dot org
- Date: Tue, 18 Oct 2016 18:53:05 +0200
- Subject: Re: GDB does not stop at assembly code address
- Authentication-results: sourceware.org; auth=none
- Sensitivity: Normal
Here's the output:
(gdb) b startup_32
Breakpoint 1 at 0xc1000000: file arch/x86/kernel/head_32.S, line 97.
(gdb) print startup_32
$1 = {<text variable, no debug info>} 0xc1000000 <startup_32>
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0xc1000000 arch/x86/kernel/head_32.S:97
(gdb) b start_kernel
Breakpoint 1 at 0xc1be3755: file init/main.c, line 480.
(gdb) print start_kernel
$1 = {void (void)} 0xc1be3755 <start_kernel>
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0xc1be3755 in start_kernel at init/main.c:480
I guess the "no debug info" would be the explanation, but why is that? The address is listed as a FUNC in readelf -Ws vmlinux, thus it should be correct. What do I have to do?
----------------------------------------------------------------------------------------------
What is startup_32 address and where does GDB set breakpoint?
You can do "print startup_32" and "info breakpoints" to get the answer
of two questions above.
--
Yao (齐尧)