From: Daniel Berlin <dan@cgsoftware.com>
To: Hilfinger@gnat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Question concerning comment in symtab.h
Date: Wed, 09 May 2001 17:21:00 -0000 [thread overview]
Message-ID: <200105100021.UAA04994@www.cgsoftware.com> (raw)
In-Reply-To: <200105100004.RAA07318@localhost.localdomain>
On Wednesday, May 9, 2001, at 08:04 PM, Paul N. Hilfinger wrote:
>
> The definition of struct block contains:
>
> /* Version of GCC used to compile the function corresponding
> to this block, or 0 if not compiled with GCC. When possible,
> GCC should be compatible with the native compiler, or if that
> is not feasible, the differences should be fixed during symbol
> reading. As of 16 Apr 93, this flag is never used to distinguish
> between gcc2 and the native compiler.
>
> If there is no function corresponding to this block, this meaning
> of this flag is undefined. */
>
> unsigned char gcc_compile_flag;
>
> Am I correct that this comment is wrong? For example, in valops.c
> (hand_function_call), we find
>
> {
> struct block *b = block_for_pc (funaddr);
> /* If compiled without -g, assume GCC 2. */
> using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b));
> }
>
> ... and later ...
>
> if (using_gcc == 0)
> if (param_type)
> /* if this parameter is a pointer to function */
> if (TYPE_CODE (param_type) == TYPE_CODE_PTR)
> if (TYPE_CODE (param_type->target_type) == TYPE_CODE_FUNC)
> /* elz: FIXME here should go the test about the compiler used
> to compile the target. We want to issue the error
> message only if the compiler used was HP's aCC.
>
> which looks to me as if it handles GCC 2 and native compilers
> differently.
>
> [I ask because we may have another use for BLOCK_GCC_COMPILED, which
> simply
> returns gcc_compile_flag, and I want to understand whether anything
> DEPENDS
> on the assertion in this comment.]
What do you want to do with BLOCK_GCC_COMPILED?
I was just getting ready to remove it.
As the comment says, you shouldn't be using it to distinguish between
gcc and something else past the symbol reading.
>
> Paul Hilfinger
next prev parent reply other threads:[~2001-05-09 17:21 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 [this message]
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
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=200105100021.UAA04994@www.cgsoftware.com \
--to=dan@cgsoftware.com \
--cc=Hilfinger@gnat.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