Re: Displaying variables from namespace with strange DWARF info
Simon Marchi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2020-09-08 11:13 a.m., Stas Perepelitsa via Gdb wrote: > Hi All, > > I've got an ELF file compiled with a proprietary C/C++ compiler, where the > project contains namespaces. > > I’ve parsed DWARF info and it reveals that variables sitting in namespace > have their names fully qualified, like AAA::BBB::name. > > Another point, the compilation unit marked as C89 source regardless of C++ > source file taken as input file. > > And there are no attributes ’ DW_AT_namespace’ found in DWARF info. You mean DW_TAG_namespace? > (Checked same project with ARM compiler and yes, there are those attributes) > As a result, the variables from namespaces are neither displayed as > variables nor as expressions. Is there any chance to teach gdb how to > process such names? Yes, it would be by hacking in dwarf2/read.c. I don't know how easy or difficult this particular change would be though. Simon