aboutsummaryrefslogtreecommitdiff
path: root/mkdep
diff options
context:
space:
mode:
authorChristina Schimpe <christina.schimpe@intel.com>2021-11-16 10:58:10 +0100
committerAndrew Burgess <aburgess@redhat.com>2021-11-19 11:29:43 +0000
commit999a4952a2f32e60769b2c3baefb274613754e6d (patch)
tree7541a704d797dafd5b8f913b119b073d9db98cfa /mkdep
parentd3ffd7f77654adafe5f1989bdfdbe4a337ff2e8b (diff)
downloadgdb-999a4952a2f32e60769b2c3baefb274613754e6d.zip
gdb-999a4952a2f32e60769b2c3baefb274613754e6d.tar.gz
gdb-999a4952a2f32e60769b2c3baefb274613754e6d.tar.bz2
gdb: Print cv qualifiers if class attributes are substituted
Make ptype print const/volatile qualifiers when template or typedef attributes are substituted. For a programm like ~~~ template<typename DataT> class Cfoo { typedef float myfloat; public: DataT me0; const DataT me1=1; const myfloat me2=2.0; }; int main() { Cfoo<int> cfoo; return 0; } ~~~ gdb outputs the following type for cfoo's attributes: ~~~ (gdb) b 14 Breakpoint 1 at 0x1170: file tmp.cc, line 14. (gdb) run Starting program: /tmp Breakpoint 1, main () at tmp.cc:14 14 return 0; (gdb) ptype cfoo type = class Cfoo<int> [with DataT = int] { public: DataT me0; DataT me1; myfloat me2; private: typedef float myfloat; } ~~~ The cv qualifiers (const in this case) are ignored for me1 and me2. After: ~~~ (gdb) ptype cfoo type = class Cfoo<int> [with DataT = int] { public: DataT me0; const DataT me1; const myfloat me2; private: typedef float myfloat; } ~~~ gdb/ChangeLog: 2021-11-16 Christina Schimpe <christina.schimpe@intel.com> * gdb/c-typeprint.c: Print cv qualifiers in case of parameter substitution. gdb/testsuite/ChangeLog: 2021-11-16 Christina Schimpe <christina.schimpe@intel.com> * gdb.cp/templates.cc: New template class Cfoo with const, template, typdef and integer attributes. * gdb.cp/templates.exp: Add new test using ptype and ptype/r commmands for template class CFoo.
Diffstat (limited to 'mkdep')
0 files changed, 0 insertions, 0 deletions