From: Joel Brobecker <brobecker@adacore.com>
To: gdb@sourceware.org
Subject: Re: More "catch assert" Ada failures
Date: Mon, 04 Jun 2007 21:30:00 -0000 [thread overview]
Message-ID: <20070604213154.GP3761@adacore.com> (raw)
In-Reply-To: <20070604190727.GM3761@adacore.com>
> OK, thanks to Daniel's help, I'm able to reproduce the issue. The issue
> in this case is that the name attributed for the entity is not following
> the GNAT encoding:
>
> <1><8e990>: Abbrev Number: 9 (DW_TAG_subprogram)
> DW_AT_sibling : <8e9b7>
> DW_AT_external : 1
> DW_AT_name : (indirect string, offset: 0x48349): system.assertions.raise_assert_failure
> DW_AT_decl_file : 2
> DW_AT_decl_line : 42
> DW_AT_low_pc : 0x1a73a0
> DW_AT_high_pc : 0x1a73d8
> DW_AT_frame_base : 0x857ee (location list)
>
> The dots should actually be "__". Not sure why this is happening,
> however. I'll see if I can get a hint or two from my compiler collegues...
With the help of Eric Botcazou, we determined GCC built straight from
the FSF tree follows our encoding, and thus does not have the "__"
replaced by dots. So it looks like it's something that the Debian
version of GCC might be doing differently. Apparently, the name
attribute generation is generated by:
/* Generate a DW_AT_name attribute given some string value to be included as
the value of the attribute. */
static void
add_name_attribute (dw_die_ref die, const char *name_string)
{
if (name_string != NULL && *name_string != 0)
{
if (demangle_name_func)
name_string = (*demangle_name_func) (name_string);
add_AT_string (die, DW_AT_name, name_string);
}
}
In our case (GNAT compiler), demangle_name_func is NULL, so we
emit the encoded name without any modification. Maybe that's
where Debian GCC does things differently?
--
Joel
next prev parent reply other threads:[~2007-06-04 21:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 13:02 Daniel Jacobowitz
2007-06-04 15:49 ` Joel Brobecker
2007-06-04 16:06 ` Daniel Jacobowitz
2007-06-04 19:06 ` Joel Brobecker
2007-06-04 21:30 ` Joel Brobecker [this message]
2007-06-04 21:57 ` Daniel Jacobowitz
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=20070604213154.GP3761@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/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