This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/13346] Multiple breakpoints/losing symbol tableissue


http://sourceware.org/bugzilla/show_bug.cgi?id=13346

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com
         Resolution|                            |INVALID

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-10-26 07:40:44 UTC ---
> (gdb) add-symbol-file ./libblah.so 0x7ffff7bdb000
> add symbol table from file "./libblah.so" at
>         .text_addr = 0x7ffff7bdb000
> (y or n) y
> # Obtained info from /proc/pid/maps ...

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).

Moreover GDB already loaded symbols for that ./libblah.so so by another
"add-symbol-file" (at a different and incorrect address) you have the symbols
twice there, it just cannot work.


>   - 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.


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.


Please correct the GDB usage first, I do not see any GDB bugs there now.

-- 
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]