diff options
author | Tom Tromey <tromey@redhat.com> | 2009-02-02 21:50:13 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-02-02 21:50:13 +0000 |
commit | a42952252f6cfaf3b84072997bd187c39b2088bb (patch) | |
tree | 9840ada8cc7928d2d48160f6ffb437564cfcff47 /gdb/valops.c | |
parent | 72a80a16c635aeea4fc0e13364de95cc9b265170 (diff) | |
download | gdb-a42952252f6cfaf3b84072997bd187c39b2088bb.zip gdb-a42952252f6cfaf3b84072997bd187c39b2088bb.tar.gz gdb-a42952252f6cfaf3b84072997bd187c39b2088bb.tar.bz2 |
gdb
PR exp/9059:
* valops.c (find_overload_match): Follow typedefs before taking
address of object argument.
gdb/testsuite
PR exp/9059:
* gdb.cp/call-c.exp: Add regression test.
* gdb.cp/call-c.cc (FooHandle): New typedef.
(main): New variable 'handle'.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 1c724d3..09be6dd 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2173,9 +2173,11 @@ find_overload_match (struct type **arg_types, int nargs, if (objp) { - if (TYPE_CODE (value_type (temp)) != TYPE_CODE_PTR - && (TYPE_CODE (value_type (*objp)) == TYPE_CODE_PTR - || TYPE_CODE (value_type (*objp)) == TYPE_CODE_REF)) + struct type *temp_type = check_typedef (value_type (temp)); + struct type *obj_type = check_typedef (value_type (*objp)); + if (TYPE_CODE (temp_type) != TYPE_CODE_PTR + && (TYPE_CODE (obj_type) == TYPE_CODE_PTR + || TYPE_CODE (obj_type) == TYPE_CODE_REF)) { temp = value_addr (temp); } |