aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb-demangle.c
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2022-11-15 10:57:32 -0600
committerCarl Love <cel@us.ibm.com>2022-11-16 11:11:45 -0500
commitd2bbd19d8e16370ebb853e2bf436e5b282177830 (patch)
treeb7c5154c79327640f852606ccc7e6a684bce8071 /gdb/gdb-demangle.c
parent3971740e4bba92209ab002d44ec3b20a36736ff0 (diff)
downloadgdb-d2bbd19d8e16370ebb853e2bf436e5b282177830.zip
gdb-d2bbd19d8e16370ebb853e2bf436e5b282177830.tar.gz
gdb-d2bbd19d8e16370ebb853e2bf436e5b282177830.tar.bz2
Bug fix in commit for printing the function return value for non-trivial values
The recent commit: commit a0eda3df5b750ae32576a9be092b361281a41787 Author: Carl Love <cel@us.ibm.com> Date: Mon Nov 14 16:22:37 2022 -0500 PowerPC, fix support for printing the function return value for non-trivial values. Is generating a segmentation fault on x86_64-linux. segfault: ... PASS: gdb.asm/asm-source.exp: info source asmsrc1.s ERROR: GDB process no longer exists UNRESOLVED: gdb.asm/asm-source.exp: finish from foo3 ... Reproduced on command line: ... $ gdb -q -batch -x outputs/gdb.asm/asm-source/gdb.in.1 ... The problem seems to be that: ... Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. 0x000000000043de7a in symbol::type (this=0x0) at .../gdb_versions/devel/src/gdb/symtab.h:1287 1287 return m_type; ... because: ... (gdb) up #1 0x0000000000852d94 in finish_command (arg=0x0, from_tty=0) at .../gdb_versions/devel/src/gdb/infcmd.c:1887 1887 = check_typedef (sm->function->type ()->target_type ()); (gdb) p sm->function $1 = (symbol *) 0x0 The code is not checking if sm->function is NULL. If sm->function is NULL the check for the return buffer should be skipped.
Diffstat (limited to 'gdb/gdb-demangle.c')
0 files changed, 0 insertions, 0 deletions