* gdb cross debugging with core files: no backtrace and no sharedlibrary loading
@ 2013-07-02 9:32 crquan
2013-07-05 14:17 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: crquan @ 2013-07-02 9:32 UTC (permalink / raw)
To: gdb
Hi all,
I have been using gdb-7.3 for my arm linux board projects for a long time,
for most applications memory crash problems I debug the program with a
core file under gdb, with correct sysroot and solib-search-path, the
backtrace command
was always able to indicate where it crashed,
but with a recent ported program, it ceased working, no any symbol
from sharedlibrary loaded, and backtrace just gave addresses with no
symbol,
that I cannot guess at that address is it a function, from binary text
or a library text section?
I'm not sure is this a gdb bug or I used it wrong, I compiled a
gdb-7.6 but got same; want to see if any one met same or similar
error, and how can I manually load symbol table from those libraries?
any suggests or comments are welcome,
Thanks,
(gdb) bt 10
#0 0x402f6040 in ?? ()
#1 0x402f6030 in ?? ()
#2 0x402f6030 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) info symbol 0x402f6040
No symbol matches 0x402f6040.
(gdb) show version
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu
--target=arm-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) show sysroot
[...]
(gdb) show solib-search-path
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb cross debugging with core files: no backtrace and no sharedlibrary loading
2013-07-02 9:32 gdb cross debugging with core files: no backtrace and no sharedlibrary loading crquan
@ 2013-07-05 14:17 ` Pedro Alves
2013-07-05 18:50 ` crquan
0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2013-07-05 14:17 UTC (permalink / raw)
To: crquan; +Cc: gdb
On 07/02/2013 10:32 AM, crquan wrote:
> Hi all,
>
> I have been using gdb-7.3 for my arm linux board projects for a long time,
> for most applications memory crash problems I debug the program with a
> core file under gdb, with correct sysroot and solib-search-path, the
> backtrace command
> was always able to indicate where it crashed,
> but with a recent ported program, it ceased working, no any symbol
> from sharedlibrary loaded, and backtrace just gave addresses with no
> symbol,
> that I cannot guess at that address is it a function, from binary text
> or a library text section?
>
> I'm not sure is this a gdb bug or I used it wrong, I compiled a
> gdb-7.6 but got same; want to see if any one met same or similar
> error, and how can I manually load symbol table from those libraries?
> any suggests or comments are welcome,
> Thanks,
Hard to say... If you've given gdb the correct sysroot, _and_ the
correct program binary, than this should work, so it would sounds like
a bug. Does this happen only with core files? IOW, debugging live
programs works fine?
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb cross debugging with core files: no backtrace and no sharedlibrary loading
2013-07-05 14:17 ` Pedro Alves
@ 2013-07-05 18:50 ` crquan
2013-07-24 14:08 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: crquan @ 2013-07-05 18:50 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb
On Fri, Jul 5, 2013 at 7:17 AM, Pedro Alves <palves@redhat.com> wrote:
> On 07/02/2013 10:32 AM, crquan wrote:
>> Hi all,
>>
>> I have been using gdb-7.3 for my arm linux board projects for a long time,
>> for most applications memory crash problems I debug the program with a
>> core file under gdb, with correct sysroot and solib-search-path, the
>> backtrace command
>> was always able to indicate where it crashed,
>> but with a recent ported program, it ceased working, no any symbol
>> from sharedlibrary loaded, and backtrace just gave addresses with no
>> symbol,
>> that I cannot guess at that address is it a function, from binary text
>> or a library text section?
>>
>> I'm not sure is this a gdb bug or I used it wrong, I compiled a
>> gdb-7.6 but got same; want to see if any one met same or similar
>> error, and how can I manually load symbol table from those libraries?
>> any suggests or comments are welcome,
>> Thanks,
>
> Hard to say... If you've given gdb the correct sysroot, _and_ the
> correct program binary, than this should work, so it would sounds like
> a bug. Does this happen only with core files? IOW, debugging live
> programs works fine?
Thanks for replying, I have given this gdb with correct sysroot and
solib-search-path,
with my other applications debugging with gdb can load symbols from
correct libraries,
only with a particular application gdb doesn't load shared libraries,
all my applications are compiled by a same gcc/glibc cross toolchain,
I've tried a live session by "target remote <board-ip-addr>:<port>",
this time gdb loaded
ld-linux.so, other library symbols are still missing,
Do you know some manual commands to load shared library symbols?
Or could you tell something from gdb source tree, I'd like to check if
it is a gdb bug,
Thanks,
>
> --
> Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb cross debugging with core files: no backtrace and no sharedlibrary loading
2013-07-05 18:50 ` crquan
@ 2013-07-24 14:08 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2013-07-24 14:08 UTC (permalink / raw)
To: crquan; +Cc: gdb
On 07/05/2013 07:50 PM, crquan wrote:
> Or could you tell something from gdb source tree, I'd like to check if
> it is a gdb bug,
corelow.c for core handling, solib.c/solib-svr4.c for shared libraries
support.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-24 14:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-02 9:32 gdb cross debugging with core files: no backtrace and no sharedlibrary loading crquan
2013-07-05 14:17 ` Pedro Alves
2013-07-05 18:50 ` crquan
2013-07-24 14:08 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox