diff options
author | Tom Tromey <tromey@redhat.com> | 2013-01-31 17:41:09 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-01-31 17:41:09 +0000 |
commit | 7078baeb174ad00adf66ba9ec53056834dbaf7e3 (patch) | |
tree | bdc0211d2c3f353fa2b8e29de9e685fa2350033d /gdb/dwarf2read.c | |
parent | 1d24041adc4750c7dde85345dd6f20e1d3fe5aca (diff) | |
download | gdb-7078baeb174ad00adf66ba9ec53056834dbaf7e3.zip gdb-7078baeb174ad00adf66ba9ec53056834dbaf7e3.tar.gz gdb-7078baeb174ad00adf66ba9ec53056834dbaf7e3.tar.bz2 |
PR c++/14998:
* dwarf2read.c (read_tag_ptr_to_member_type): Handle
TYPE_CODE_FUNC.
gdb/testsuite
* gdb.dwarf2/method-ptr.cc: New file.
* gdb.dwarf2/method-ptr.exp: New file.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index d2dd149..cef20e2 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -12270,6 +12270,15 @@ read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) if (TYPE_CODE (check_typedef (to_type)) == TYPE_CODE_METHOD) type = lookup_methodptr_type (to_type); + else if (TYPE_CODE (check_typedef (to_type)) == TYPE_CODE_FUNC) + { + struct type *new_type = alloc_type (cu->objfile); + + smash_to_method_type (new_type, domain, TYPE_TARGET_TYPE (to_type), + TYPE_FIELDS (to_type), TYPE_NFIELDS (to_type), + TYPE_VARARGS (to_type)); + type = lookup_methodptr_type (new_type); + } else type = lookup_memberptr_type (to_type, domain); |