[Bug breakpoints/34163] SIGSEGV (null-pointer dereference) when setting breakpoint
dories.spirits_0p at icloud dot com
sourceware-bugzilla@sourceware.org
Tue May 19 18:31:27 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=34163
--- Comment #1 from KBDeveloper <dories.spirits_0p at icloud dot com> ---
I've found a hard crash (SIGSEGV) when setting a breakpoint in GDB.
> gdb test.elf
GNU gdb (GDB) 18.0.50.20260519-git
[...]
(gdb) b main
Fatal signal: Segmentation fault
[...]
I've attached a full backtrace as well as the test.elf file.
I've confirmed this on Ubuntu 26.04 gdb-multiarch 17.1 as well as a freshly
built copy at commit 5100d2b6.
The elf file was generated by a plugin for Ghidra (slightly modified version of
https://github.com/antmicro/girdl) so I highly suspect there's something
non-standards-compliant with the elf file that gdb wasn't expecting.
I briefly ran my gdb copy through a debugger, and the crash seems to be caused
by a null pointer dereference when determining the target arch:
Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
get_sal_arch (sal=...) at ../../binutils-gdb/gdb/breakpoint.c:7785
7785 return sal.section->objfile->arch ();
(gdb) p *sal.section
$1 = {the_bfd_section = 0x0, objfile = 0x0, ovly_mapped = 0}
(gdb) p sal.section.objfile
$2 = (objfile *) 0x0
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list