Discussion:
[Bug gdb/21563] New: gdb segfaults when trying to read DWARF symbols created by TI compiler
mr.nuke.me at gmail dot com
2017-06-09 22:54:54 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21563

Bug ID: 21563
Summary: gdb segfaults when trying to read DWARF symbols
created by TI compiler
Product: gdb
Version: 7.6
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: mr.nuke.me at gmail dot com
Target Milestone: ---

Created attachment 10086
--> https://sourceware.org/bugzilla/attachment.cgi?id=10086&action=edit
ELF file that causes GDB to go tits up

arm-none-eabi-gdb will segfault when trying to read or demangle a symbol from a
DWARF section created with TI code composer studio.

There are several ways to produce the crash, either by typing break, then
hitting <Tab> to autocomplete, or trying to break on a function name. The
segfault happens in 'd_demangle_callback()' every time.

$ arm-none-eabi-gdb ~/ti_ccs_gdb_crash.elf
GNU gdb (GDB) 7.6.2
[snip]
Reading symbols from /home/mrnuke/ti_ccs_gdb_crash.elf...done.
(gdb) break main
Segmentation fault (core dumped)

I expect that gdb either sets the correct breakpoint, or says that symbol
cannot be found (if it cannot demangle the names).
--
You are receiving this mail because:
You are on the CC list for the bug.
mr.nuke.me at gmail dot com
2017-06-09 22:55:47 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21563

--- Comment #1 from mrnuke <mr.nuke.me at gmail dot com> ---
Created attachment 10087
--> https://sourceware.org/bugzilla/attachment.cgi?id=10087&action=edit
GDB Backtrace of GDB crashing
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-04-19 16:05:41 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21563

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2018-04-19
CC| |tromey at sourceware dot org
Ever confirmed|0 |1

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I have a --enable-targets=all build and I tried:

(gdb) set gnutarget elf32-littlearm

Then I used "file" to read the ELF file.
"break main" worked for me.
I also tried "file -readnow" to force full DWARF expansion,
and this worked as well.

Does it fail for you with a newer gdb?
I suspect this has been fixed but confirmation would be good to have.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...