From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH][gdb/ada] Handle artificial local symbols
Date: Fri, 17 Sep 2021 13:42:06 -0600 [thread overview]
Message-ID: <87zgsbng4x.fsf@tromey.com> (raw)
In-Reply-To: <20210824111357.GA28507@delia> (Tom de Vries via Gdb-patches's message of "Tue, 24 Aug 2021 13:13:59 +0200")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> Fix this instead by marking the symbol as artificial, and:
Tom> - ignoring such symbols in ada_resolve_variable, which fixes the FAIL
Tom> - ignoring such ada symbols in do_print_variable_and_value, which prevents
Tom> them from showing up in "info locals"
Tom> Note that a fix for the latter was submitted here (
Tom> https://sourceware.org/pipermail/gdb-patches/2008-January/054994.html ), and
Tom> this patch borrows from it.
Thanks for doing this.
Tom> + /* Handle DW_AT_artificial. */
Tom> + attr = dwarf2_attr (die, DW_AT_artificial, cu);
Tom> + if (attr != nullptr)
Tom> + sym->artificial = 1;
This should also check attr->as_boolean.
Probably also use '= true', though
sym->artificial = attr->as_boolean ()
would also be fine.
Tom> + if (language_def (sym->language ())->symbol_printing_suppressed (sym))
Tom> + return;
Seems fine though I also wonder if it would be better to just always
suppress artificial variables here.
Tom> + /* Whether this symbol is artificial. */
Tom> +
Tom> + unsigned int artificial : 1;
I think making this bool would be better.
Tom
next prev parent reply other threads:[~2021-09-17 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 11:13 Tom de Vries
2021-09-14 12:59 ` [PING][PATCH][gdb/ada] " Tom de Vries
2021-09-17 19:42 ` Tom Tromey [this message]
2021-09-17 23:28 ` [PATCH][gdb/ada] " Tom de Vries
2021-09-18 1:15 ` Tom Tromey
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=87zgsbng4x.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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).