aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorChristina Schimpe <christina.schimpe@intel.com>2021-10-25 17:08:32 +0200
committerChristina Schimpe <christina.schimpe@intel.com>2022-03-04 16:42:30 +0100
commite8db803129822d3df8e773f28dd99105a84d881d (patch)
treea4ea0a41756612b8cb00142b92e306c44af2ded3 /binutils
parent7919e5667cf6607a3d7e28b1fa7f15f3c49a4e55 (diff)
downloadbinutils-e8db803129822d3df8e773f28dd99105a84d881d.zip
binutils-e8db803129822d3df8e773f28dd99105a84d881d.tar.gz
binutils-e8db803129822d3df8e773f28dd99105a84d881d.tar.bz2
gdb: Use a typedef's scoped type name to identify local typedefs
GDB prints the wrong type for typedefs in case there is another typedef available for the same raw type (gdb/16040). The reason is that the current hashmap based substitution mechanism always compares the target type of a typedef and not its scoped name. The original output of GDB for a program like ~~~~ namespace ns { typedef double scoped_double; } typedef double global_double; class TypedefHolder { public: double a; ns::scoped_double b; global_double c; private: typedef double class_double; class_double d; double method1(ns::scoped_double) { return 24.0; } double method2(global_double) { return 24.0; } }; int main() { TypedefHolder th; return 0; } ~~~~ is ~~~~ (gdb) b 27 Breakpoint 1 at 0x1131: file TypedefHolder.cc, line 27. (gdb) r Starting program: /tmp/typedefholder Breakpoint 1, main () at TypedefHolder.cc:27 27 return 0; (gdb) ptype th type = class TypedefHolder { public: class_double a; class_double b; class_double c; private: class_double d; class_double method1(class_double); class_double method2(class_double); typedef double class_double; } ~~~~ Basically all attributes of a class which have the raw type "double" are substituted by "class_double". With the patch the output is the following ~~~~ type = class TypedefHolder { public: double a; ns::scoped_double b; global_double c; private: class_double d; double method1(ns::scoped_double); double method2(global_double); typedef double class_double; } ~~~~
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions