This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/13346] Multiple breakpoints/losing symbol tableissue
- From: "j.vimal at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 26 Oct 2011 14:35:44 +0000
- Subject: [Bug breakpoints/13346] Multiple breakpoints/losing symbol tableissue
- Auto-submitted: auto-generated
- References: <bug-13346-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13346
--- Comment #2 from Vimal <j.vimal at gmail dot com> 2011-10-26 14:35:44 UTC ---
>
> I bet the .text section does not start at a page boundary (0x...000).
> See:
> readelf -WS ./libblah.so | grep '\.text'
>
> You need to add the "Address" field to the base address you see in
> /proc/pid/maps as the ".text_addr" (when the library starts at 0 - it is
> unprelinked. If you run prelink you moreover need to subtract the prelink
> address).
I did not know that; I am sorry... How do you check if the library is
prelinked?
>
> > - breakpoint is set at 2 locations (gdb/master)
> > http://pastebin.com/4PhDAHwW
>
> I do not think you need to use "-s" option for "add-symbol-file", a single
> offset should be sufficient, I am not completely sure but I am almost sure the
> kernel loads all .ko file seguments with the same displacement.
> And the .text section looks to have wrong address here as in the previous case.
I did try without specifying the extra segments, but the same problem persists.
About the .text section, once I insmod, I check the address of the function
via /proc/kallsyms in the guest.
>
>
> Also initially GDB already loaded symbols for "vmlinux" so you should remove
> them first (for example by "file" itself), otherwise you have the same symbol
> file loaded twice, at two locations, which may work in the future with Tom
> Tromey's ambiguous-linespec patches but they are not yet finished / checked in.
But, how is that possible? Since the kernel module is loaded dynamically;
vmlinux itself does not have any symbols for the function I am setting
breakpoint?
BTW, the above commands for kernel module work correctly with gdb-7.1.
Thanks,
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.