Displaying variables from namespace with strange DWARF info

Stas Perepelitsa pet.shelford@gmail.com
Tue Sep 8 15:13:37 GMT 2020

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.
(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?


More information about the Gdb mailing list