From: Simon Marchi <simark@simark.ca>
To: Stas Perepelitsa <pet.shelford@gmail.com>, gdb@sourceware.org
Subject: Re: Displaying variables from namespace with strange DWARF info
Date: Fri, 11 Sep 2020 10:49:06 -0400 [thread overview]
Message-ID: <807038ce-913d-f8a1-2bad-bce2da867a6d@simark.ca> (raw)
In-Reply-To: <CAEnSbcyDoxiNozen0mApZEmb7fCUjG-VeGKJZ6aZim06LfYVMw@mail.gmail.com>
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
prev parent reply other threads:[~2020-09-11 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 15:13 Stas Perepelitsa
2020-09-11 14:49 ` Simon Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=807038ce-913d-f8a1-2bad-bce2da867a6d@simark.ca \
--to=simark@simark.ca \
--cc=gdb@sourceware.org \
--cc=pet.shelford@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).