* Two gdb 6.4 usage queries
@ 2006-10-30 3:59 Jon Grant
2006-11-11 22:06 ` Jon Grant
0 siblings, 1 reply; 4+ messages in thread
From: Jon Grant @ 2006-10-30 3:59 UTC (permalink / raw)
To: gdb
Hello,
I have to queries, I hope someone will be able explain or point me to
documentation.
(I am running Kubuntu 6.06 on a 32bit Althon.)
1) Shared library methods are relocated when they are used by a program,
is there a way to view the present running address of these shared
library functions/methods from gdb?
2) I would like to get to see the same backtrace that the kde crash
handler has generated
callstack like:
[KCrash handler]
#6 0x00000000 in ?? ()
#7 0xb7182f3e in QApplication::internalNotify () from
/usr/lib/libqt-mt.so.3
#8 0xb718313a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#9 0xb78617ab in KApplication::notify () from /usr/lib/libkdecore.so.4
#10 0xb71141c5 in QApplication::sendSpontaneousEvent ()
from /usr/lib/libqt-mt.so.3
<snip>
When I attach the to crashed process with gdb all I can get is this:
$ gdb /usr/bin/ark 6582
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
Attaching to program: /usr/bin/ark, process 6582
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d09110 in ?? ()
#2 0xb7d08f3c in ?? ()
#3 0xbfc11bb4 in ?? ()
#4 0xbfc11bb4 in ?? ()
#5 0x00000000 in ?? ()
Thanks for any help.
Please include my email address in any reply.
Kind regards
Jon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Two gdb 6.4 usage queries
2006-10-30 3:59 Two gdb 6.4 usage queries Jon Grant
@ 2006-11-11 22:06 ` Jon Grant
2006-11-11 22:28 ` Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: Jon Grant @ 2006-11-11 22:06 UTC (permalink / raw)
To: gdb
Hello,
Don't think I missed any reply.. I wonder if anyone could help me with
some info on how solve the problems?
Please include my email address in any reply.
Kind regards
Jon
Jon Grant elucidated on 30/10/06 04:00:
> Hello,
>
> I have to queries, I hope someone will be able explain or point me to
> documentation.
> (I am running Kubuntu 6.06 on a 32bit Althon.)
>
> 1) Shared library methods are relocated when they are used by a program,
> is there a way to view the present running address of these shared
> library functions/methods from gdb?
>
> 2) I would like to get to see the same backtrace that the kde crash
> handler has generated
>
> callstack like:
> [KCrash handler]
> #6 0x00000000 in ?? ()
> #7 0xb7182f3e in QApplication::internalNotify () from
> /usr/lib/libqt-mt.so.3
> #8 0xb718313a in QApplication::notify () from /usr/lib/libqt-mt.so.3
> #9 0xb78617ab in KApplication::notify () from /usr/lib/libkdecore.so.4
> #10 0xb71141c5 in QApplication::sendSpontaneousEvent ()
> from /usr/lib/libqt-mt.so.3
> <snip>
>
> When I attach the to crashed process with gdb all I can get is this:
>
> $ gdb /usr/bin/ark 6582
> GNU gdb 6.4-debian
> Copyright 2005 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
> Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
>
> Attaching to program: /usr/bin/ark, process 6582
> (no debugging symbols found)
> 0xffffe410 in __kernel_vsyscall ()
> (gdb) bt
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb7d09110 in ?? ()
> #2 0xb7d08f3c in ?? ()
> #3 0xbfc11bb4 in ?? ()
> #4 0xbfc11bb4 in ?? ()
> #5 0x00000000 in ?? ()
>
> Thanks for any help.
>
> Please include my email address in any reply.
>
> Kind regards
> Jon
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Two gdb 6.4 usage queries
2006-11-11 22:06 ` Jon Grant
@ 2006-11-11 22:28 ` Mark Kettenis
2006-11-12 1:25 ` Jon Grant
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2006-11-11 22:28 UTC (permalink / raw)
To: Jon Grant; +Cc: gdb
> Hello,
>
> Don't think I missed any reply.. I wonder if anyone could help me with
> some info on how solve the problems?
For one thing, those backtraces do not correspond to the same state.
I don't know what the kde crash handler is doing, but it might be worth
trying to disable it, such that your program just crashes. The resulting
core dump should be easier to interpret. And if it isn't, you probably
need to install the appropriote debug info packages for your system.
> > Attaching to program: /usr/bin/ark, process 6582
> > (no debugging symbols found)
Do yourself a favour, and compile your code (all of it) with -g.
> > 0xffffe410 in __kernel_vsyscall ()
> > (gdb) bt
> > #0 0xffffe410 in __kernel_vsyscall ()
> > #1 0xb7d09110 in ?? ()
> > #2 0xb7d08f3c in ?? ()
> > #3 0xbfc11bb4 in ?? ()
> > #4 0xbfc11bb4 in ?? ()
> > #5 0x00000000 in ?? ()
Make sure you install at least the debug info packages for glibc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Two gdb 6.4 usage queries
2006-11-11 22:28 ` Mark Kettenis
@ 2006-11-12 1:25 ` Jon Grant
0 siblings, 0 replies; 4+ messages in thread
From: Jon Grant @ 2006-11-12 1:25 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb
Hi Mark,
Thanks for your reply with suggestions.
Mark Kettenis elucidated on 11/11/06 22:28:
>> Hello,
>>
>> Don't think I missed any reply.. I wonder if anyone could help me with
>> some info on how solve the problems?
>
> For one thing, those backtraces do not correspond to the same state.
> I don't know what the kde crash handler is doing, but it might be worth
> trying to disable it, such that your program just crashes. The resulting
> core dump should be easier to interpret. And if it isn't, you probably
> need to install the appropriote debug info packages for your system.
That sounds good. I've not noticed "core" files being dumped since I
switched to Kubuntu, do you know if I have to enable something somewhere
to get them?
>>> Attaching to program: /usr/bin/ark, process 6582
>>> (no debugging symbols found)
>
> Do yourself a favour, and compile your code (all of it) with -g.
Unfortunately these are the binaries shipped with Kubuntu from KDE
>>> 0xffffe410 in __kernel_vsyscall ()
>>> (gdb) bt
>>> #0 0xffffe410 in __kernel_vsyscall ()
>>> #1 0xb7d09110 in ?? ()
>>> #2 0xb7d08f3c in ?? ()
>>> #3 0xbfc11bb4 in ?? ()
>>> #4 0xbfc11bb4 in ?? ()
>>> #5 0x00000000 in ?? ()
>
> Make sure you install at least the debug info packages for glibc.
I really wish Kubuntu 6.06 had such packages, would make it a lot
simpler trying to give feedback on crashes.
Perhaps I shouldn't bother filing bugs until they start shipping binaries
which can produce useful backtraces out-of-the-box. The crashes are nearly
always not reproducible unfortunately.
I managed to find the bit of info I needed "frame n" and "show address"
which allowed me to calculate the position in the disassembled file I
got from objdump. GDB doesn't demangle symbols it seems too. Do you know
if it
only attempts to demangle using debug sections?
Please include my email address in any replies as I'm not a member of
this list.
Thanks for your help, Kind regards
Jon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-12 1:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-30 3:59 Two gdb 6.4 usage queries Jon Grant
2006-11-11 22:06 ` Jon Grant
2006-11-11 22:28 ` Mark Kettenis
2006-11-12 1:25 ` Jon Grant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox