public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [gdb v10] My Build Cannot Tell the Symbol Info. to Debug the Core Dump
@ 2021-07-26 10:40 SUN Michael
  2021-07-26 12:52 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: SUN Michael @ 2021-07-26 10:40 UTC (permalink / raw)
  To: gdb

Hi team,


Now I meet an issue when to debug the core dump file. That’s it:
Using gdb v9 and the older version the related symbol files will be auto loaded following the command:
$ gdb $EXE $CORE -ex “set sysroot $SYMBOL_PATH”

GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
… …
Reading symbols from <$EXE>...
[New LWP 1800]
[New LWP  …  ]
… …
Reading symbols from XXX
… …
(gdb)


However, on gdb v10 there’s no “Reading symbols from” processing:(,
and the console directly goes to “(gdb)” without any wait or prompt.
And then after I typed “bt”, there’ no symbol information ― it seems the symbols have not been loaded at all:
#0  0x0000000c0d8b50 in ?? ()
#1  0x0000000ddbd808 in ?? ()


I CROSS-compiled v9 and v10 using the same configuration as below:
configure --host=x86_64-pc-linux-gnu --target=aarch64-linux-android --with-python=/usr/bin/python --with-expat --with-lzma

, and my v10’s “show configuration”:
   configure --host=x86_64-pc-linux-gnu --target=aarch64-linux-android
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/XXX/gdb/gdb-10/share/gdb (relocatable)
             --with-jit-reader-dir=/XXX/gdb/gdb-10/lib/gdb (relocatable)
             --without-libunwind-ia64
             --with-lzma
             --without-babeltrace
             --without-intel-pt
             --without-mpfr
             --without-xxhash
             --with-python=/usr
             --with-python-libdir=/usr/lib
             --without-debuginfod
             --without-guile
             --disable-source-highlight
             --with-separate-debug-dir=/XXX/gdb/gdb-10/lib/debug (relocatable)


Appreciate for your attention and help in advance:)
THX!!



Best regards,


Michael SUN


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gdb v10] My Build Cannot Tell the Symbol Info. to Debug the Core Dump
  2021-07-26 10:40 [gdb v10] My Build Cannot Tell the Symbol Info. to Debug the Core Dump SUN Michael
@ 2021-07-26 12:52 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-07-26 12:52 UTC (permalink / raw)
  To: SUN Michael; +Cc: gdb

* SUN Michael via Gdb <gdb@sourceware.org> [2021-07-26 10:40:12 +0000]:

> Hi team,
> 
> 
> Now I meet an issue when to debug the core dump file. That’s it:
> Using gdb v9 and the older version the related symbol files will be auto loaded following the command:
> $ gdb $EXE $CORE -ex “set sysroot $SYMBOL_PATH”
> 
> GNU gdb (GDB) 9.2
> Copyright (C) 2020 Free Software Foundation, Inc.
> … …
> Reading symbols from <$EXE>...
> [New LWP 1800]
> [New LWP  …  ]
> … …
> Reading symbols from XXX
> … …
> (gdb)
> 
> 
> However, on gdb v10 there’s no “Reading symbols from” processing:(,
> and the console directly goes to “(gdb)” without any wait or prompt.

That's weird, I'd expect there to be some kind of message, even where
there's no debug symbols.

Using GDB 10.1, here's me starting up using a stripped executable:

  Reading symbols from make-core.x...
  (No debugging symbols found in make-core.x)

  [New LWP 659726]
  Core was generated by `/home/andrew/tmp/make-core.x'.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x0000000000401141 in ?? ()
  (gdb) 

The other possibility would be the executable is missing, in this case
GDB will still load the core file.  But even then you get a warning:

  make-core.typo.x: No such file or directory.
  [New LWP 659726]
  Core was generated by `/home/andrew/tmp/make-core.x'.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x0000000000401141 in ?? ()
  (gdb) 

You could try switching on a few debug flags and see if they help at
all, maybe something like (note, starting GDB with -n to avoid loading
any init files, just in case they are hurting in some weird way):

  $ gdb -n
  (gdb) set debug dwarf-read 1
  (gdb) set debug symtab-create 1
  (gdb) file ${EXE}
  (gdb) core-file ${COREFILE}

this might help understand what's going on.

Thanks,
Andrew


> And then after I typed “bt”, there’ no symbol information ― it seems the symbols have not been loaded at all:
> #0  0x0000000c0d8b50 in ?? ()
> #1  0x0000000ddbd808 in ?? ()
> 
> 
> I CROSS-compiled v9 and v10 using the same configuration as below:
> configure --host=x86_64-pc-linux-gnu --target=aarch64-linux-android --with-python=/usr/bin/python --with-expat --with-lzma
> 
> , and my v10’s “show configuration”:
>    configure --host=x86_64-pc-linux-gnu --target=aarch64-linux-android
>              --with-auto-load-dir=$debugdir:$datadir/auto-load
>              --with-auto-load-safe-path=$debugdir:$datadir/auto-load
>              --with-expat
>              --with-gdb-datadir=/XXX/gdb/gdb-10/share/gdb (relocatable)
>              --with-jit-reader-dir=/XXX/gdb/gdb-10/lib/gdb (relocatable)
>              --without-libunwind-ia64
>              --with-lzma
>              --without-babeltrace
>              --without-intel-pt
>              --without-mpfr
>              --without-xxhash
>              --with-python=/usr
>              --with-python-libdir=/usr/lib
>              --without-debuginfod
>              --without-guile
>              --disable-source-highlight
>              --with-separate-debug-dir=/XXX/gdb/gdb-10/lib/debug (relocatable)
> 
> 
> Appreciate for your attention and help in advance:)
> THX!!
> 
> 
> 
> Best regards,
> 
> 
> Michael SUN
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-26 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 10:40 [gdb v10] My Build Cannot Tell the Symbol Info. to Debug the Core Dump SUN Michael
2021-07-26 12:52 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).