diff options
author | Keith Seitz <keiths@redhat.com> | 2015-02-27 09:55:07 -0800 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2015-03-23 12:50:28 -0700 |
commit | 7e993ebf2343a5b39d6d1df29fdebc2818064ae5 (patch) | |
tree | feff02f0e16e1f84bc4c35ab48298f81f4d2bdb3 /gdb/linespec.h | |
parent | c53ed7cf577806c9d7d658dec5b70b2de00ec825 (diff) | |
download | fsf-binutils-gdb-7e993ebf2343a5b39d6d1df29fdebc2818064ae5.zip fsf-binutils-gdb-7e993ebf2343a5b39d6d1df29fdebc2818064ae5.tar.gz fsf-binutils-gdb-7e993ebf2343a5b39d6d1df29fdebc2818064ae5.tar.bz2 |
PR gdb/18021 - defend against "static virtual" methods
This bug appears to be caused by bad debuginfo. The method
causing the sefault in the reporter's test case is marked both static
and virtual.
This patch simply safegaurds against this case in dwarf2_add_member_fn,
where the code assumes that there is a `this' pointer when a virtual method
is seen (more specifically, when DW_AT_vtable_elem is seen).
It previously dereferenced the first formal parameter
(`this' pointer), which in this case doesn't exist. GDB consequently
segfaulted dereferencing a NULL pointer.
gdb/ChangeLog
PR gdb/18021
* dwarf2read.c (dwarf2_add_member_fn): Issue a complaint
if we find a static method with DW_AT_vtable_elem_location.
gdb/testsuite/ChangeLog
PR gdb/18021
* gdb.dwarf2/staticvirtual.exp: New test.
Diffstat (limited to 'gdb/linespec.h')
0 files changed, 0 insertions, 0 deletions