From: Elena Zannoni <ezannoni@redhat.com>
To: David Carlton <carlton@kealia.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] pc bounds checking and namespaces
Date: Mon, 19 Jan 2004 00:05:00 -0000 [thread overview]
Message-ID: <16395.7859.103028.66452@localhost.redhat.com> (raw)
In-Reply-To: <m3smifbdrq.fsf@coconut.kealia.com>
David Carlton writes:
> When calculating the pc bounds for a block in dwarf2read.c, we assume
> that all functions contained in that block are immediate children of
> the block. I was using a patched version of GCC where this doesn't
> hold - the dies associated to definitions of functions in namespaces
> are children of a DW_TAG_namespace die instead of the
> DW_TAG_compile_unit die. I don't know where GCC 3.4 puts the
> relevant dies, so this might not be an issue with GCC 3.4, but it
> might be; it seems like fixing that assumption is a good idea in any
> case.
>
> So this patch takes the code to calculate the lowpc/highpc out of
> psymtab_to_symtab_1 and read_file_scope (where that functionality had
> been duplicated), extracts it to a new function get_scope_pc_bounds,
> and then modifies that new function to handle DW_TAG_namespace
> appropriately.
>
> I tried to come up with a test case for this, but I wasn't
> successful. :-( I can say that, before this patch, I used to see a lot
> of "pc 0xNNNN in read in psymtab, but not in symtab" messages when
> debugging, and now I don't.
>
> Tested on GCC 3.2 both with and without DW_TAG_namespace,
> i686-pc-linux-gnu, DWARF-2; no regressions. OK to commit?
>
Again, a sanity check with 2.95 and -gdwarf-2 would be good.
> - {
> - /* Some compilers don't define a DW_AT_high_pc attribute for
> - the compilation unit. If the DW_AT_high_pc is missing,
> - synthesize it, by scanning the DIE's below the compilation unit. */
I'd rather keep this comment around, probably at the first call.
Ok otherwise.
elena
next prev parent reply other threads:[~2004-01-19 0:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-17 0:49 David Carlton
2004-01-19 0:05 ` Elena Zannoni [this message]
2004-01-19 18:36 ` David Carlton
2004-01-22 19:57 ` David Carlton
2004-01-19 6:06 Michael Elizabeth Chastain
2004-01-19 18:16 ` Andrew Cagney
2004-01-19 19:18 ` David Carlton
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=16395.7859.103028.66452@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=carlton@kealia.com \
--cc=gdb-patches@sources.redhat.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