From: Daniel Berlin <dan@www.cgsoftware.com>
To: Paul Hilfinger <hilfingr@gnat.com>
Cc: <gdb-patches@sources.redhat.com>
Subject: Re: Question concerning comment in symtab.h
Date: Wed, 09 May 2001 23:33:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0105100145450.11973-100000@www.cgsoftware.com> (raw)
In-Reply-To: <20010510053353.41B0FF28A4@nile.gnat.com>
On Thu, 10 May 2001, Paul Hilfinger wrote:
>
> Date: Thu, 10 May 2001 00:20:22 -0400 (EDT)
> From: Daniel Berlin <dan@www.cgsoftware.com>
>
> > > Right, and that's our intention. So, during symbol reading, one is now
> > > supposed to reference gcc_compile_flag directly (and not reference it at
> > > all elsewhere)?
> > You mean proceessing_gcc_compilation. This is what BLOCK_GCC_COMPILED gets
> > set to.
>
> Actually, I *did* mean gcc_compile_flag, which is what BLOCK_GCC_COMPILED
> is, but now I understand what you mean.
>
> > It only matters for STABS, anyway. For DWARF2, it's always set to 2, and
> > i'm not sure about mdebug and xcoff.
>
> I'm glad I brought this thread up, because now it's clear that I'm confused.
> If BLOCK_GCC_COMPILED is always 2 for DWARF2, then the current comments imply
> that only GCC produces DWARF2 (because a native compiler is supposed to set
> gcc_compile_flag, and thus BLOCK_GCC_COMPILED to 0). Is that true?
Whether it's still true, i couldn't tell you. I know that on MIPS, SGI's
compilers producce dwarf2, and GCC on mips produces slightly different
dwarf2 info than normal in order to be compatible with dbx (DWARF2.0 has
some ambiguities that nobody realized at the time. The only difference i
can actually remember their being, besides the extra info we omit on other
platforms sincce gdb didn't use it, is in the array bounds specification).
Almost every compiler vendor i know of (Intel, Compaq, Fujitsu, the
portland group, etc) uses dwarf2 wherever the debug format isn't already
locked in for other reasons.
If you search through the comp.compilers archives for optimized code
debugging, you'll see quite a few people mention that dwarf2 can do it,
but that they never expect to see compilers producing dwarf2 on pc class
machines.
So it was certainly a reasonable expectation at the time, although now
shown to be not so much anymore.
In other words, nobody's bitched about structure returns with dwarf2 info
yet, so it hasn't been fixed, because nobody's tickled all the right
conditions. I'd need a test case to work with to get all the code right
anyway.
> > Do all the hacks necessary in the symbol readers, unless it's
literally
> > impossible.
> > Heck, i'd rather see someone have to add a field to the type structure to
> > or symbol structure to handle a difference, then introduce hacks into
> > hand_function_call or something.
>
> I could just wait for the patch, but out of curiosity, how are you now
> going to handle the last argument of using_struct_return?
Here's a long answer:
This can be done through a simple abstraction layer.
I was going to add a struct to implement compiler related
abstractions, such as this one, and throw one pointer to the struct per
objfile. Then, for native/gcc compiler differences, or even gcc version
differences, you just fill in the struct pointers to functions that do the
right thing for that particular compiler, on this particular host.
As you can tell, I'm against things like the gcc_p flags to
using_struct_return. It's putting the knowledge in the wrong place, and
doing it in the wrong way to boot.
But anyway, ... >
>
> P. Hilfinger
>
next prev parent reply other threads:[~2001-05-09 23:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-09 17:04 Paul N. Hilfinger
2001-05-09 17:21 ` Daniel Berlin
2001-05-09 20:42 ` Paul Hilfinger
2001-05-09 21:20 ` Daniel Berlin
2001-05-09 22:33 ` Paul Hilfinger
2001-05-09 23:33 ` Daniel Berlin [this message]
2001-05-16 12:39 ` Elena Zannoni
2001-05-16 12:50 ` Paul Hilfinger
2001-05-16 13:09 ` Daniel Berlin
[not found] ` <15106.61691.835809.994768@kwikemart.cygnus.com>
2001-05-16 14:39 ` Daniel Berlin
2001-05-16 21:30 ` Elena Zannoni
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=Pine.LNX.4.33.0105100145450.11973-100000@www.cgsoftware.com \
--to=dan@www.cgsoftware.com \
--cc=gdb-patches@sources.redhat.com \
--cc=hilfingr@gnat.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