From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: Andrew Cagney <ac131313@cygnus.com>,
gdb-patches@sources.redhat.com, Jason Merrill <jason@redhat.com>
Subject: Re: RFA: MI tests: tolerate prototypes
Date: Thu, 07 Feb 2002 12:27:00 -0000 [thread overview]
Message-ID: <20020207152709.A27386@nevyn.them.org> (raw)
In-Reply-To: <npg04di07b.fsf@zwingli.cygnus.com>
On Thu, Feb 07, 2002 at 02:03:20PM -0500, Jim Blandy wrote:
>
> > Jim, my preference here is more along your proposal - have an explicit
> > ``prototype-unknown'' state.
> >
> > From memory the last time this came up I also suggested here that
> > changing the default behavour across GDB is probably a good thing. I
> > don't think this is something that individual targets should be
> > deciding. Instead GDB should exibit consistent behavour across
> > host/target combinations, the decision being made on the basis of the
> > debug info.
>
> Well, I wouldn't call it target-specific. The compromise we're making
> is more like this:
>
> GCC's STABS describe prototyped function types as if they were
> non-prototyped function types. However, it does provide accurate
> pass-as types for function definitions. This means that GDB can
> correctly call functions under STABS if it reads function definition
> types *as if* they were prototyped, using the pass-as types as the
> argument types.
>
> The downsides of this proposal:
>
> - GDB will print function argument types incorrectly. For example,
> suppose we have the following function definition:
>
> int f (short s, float f) { return s + f; }
>
> Since the arguments' pass-as types for `s' and `f' are `int' and
> `double', GDB will print f's type as `int f(int, double)'. This is
> weird, but it's a direct consequence of lying about the type.
Clarification: If f were not prototyped, this would be true. So it's a
very small price to pay, IMHO. If it is prototyped, the pass-as type
for f will be float, right?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-02-07 20:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-03 13:04 Jim Blandy
2002-02-03 15:01 ` Daniel Jacobowitz
2002-02-05 15:54 ` Jim Blandy
2002-02-05 17:21 ` Daniel Jacobowitz
2002-02-05 20:30 ` Jim Blandy
2002-02-05 21:48 ` Daniel Jacobowitz
2002-02-06 10:48 ` Jim Blandy
2002-02-06 16:14 ` Andrew Cagney
2002-02-06 16:24 ` Daniel Jacobowitz
2002-02-07 11:01 ` Jim Blandy
2002-02-07 12:27 ` Daniel Jacobowitz [this message]
2002-02-08 10:03 ` Jim Blandy
2002-02-08 5:16 ` function pointer stabs (was Re: RFA: MI tests: tolerate prototypes) Jason Merrill
2002-02-08 7:44 ` Daniel Jacobowitz
2002-02-08 11:37 ` Jim Blandy
2002-02-08 14:51 ` Jim Blandy
2002-02-09 12:15 ` Jim Blandy
2002-02-09 14:13 ` Daniel Jacobowitz
2002-02-03 16:29 ` RFA: MI tests: tolerate prototypes Andrew Cagney
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=20020207152709.A27386@nevyn.them.org \
--to=drow@mvista.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jason@redhat.com \
--cc=jimb@zwingli.cygnus.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