From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb@sources.redhat.com, dan@debian.org
Subject: Re: REG_STRUCT_HAS_ADDR
Date: Mon, 08 Sep 2003 18:43:00 -0000 [thread overview]
Message-ID: <3F5CCDDD.4010809@redhat.com> (raw)
In-Reply-To: <200309062206.h86M62no012596@elgar.kettenis.dyndns.org>
> Unfortunately this breaks debugging with stabs, since stabsread.c uses
> the same REG_STRUCT_HAS_ADDR to see if a function argument is passed
> by value or by reference. I think we really want to get rid of the
> broken code in infcall.c in the long run. Therefore I looked for a
> way to disable it for "modern" targets, i.e. targets that define
> PUSH_DUMMY_CALL as opposed to the old PUSH_DUMMY_FRAME & friends.
> Looking at the code I found that the following targets (besides SPARC)
> are using REG_STRUCT_HAS_ADDR:
Instead, add a new method:
STABS_REG_STRUCT_HAS_ADDR
with a default of:
if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
return REG_STRUCT ... ();
else
return 0;
(no predicate) (I think I've got that right) (better name?) and
deprecate REG_STRUCT_HAS_ADDR{,_P}. I think stabsread.c can then switch
to the STABS variant.
That should let you safely disentangle the SPARC without breaking
"stabsread.c".
> - if (REG_STRUCT_HAS_ADDR_P ())
> + if (REG_STRUCT_HAS_ADDR_P ()
> + && !gdbarch_push_dummy_call_p (current_gdbcarch))
The switch to push_dummy_call_p shouldn't cause unexpected side effects
such as disabling REG_STRUCT_HAS_ADDR_P. From memory, I've got the
current code down to just one and even that doesn't really need it.
Andrew
next prev parent reply other threads:[~2003-09-08 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-06 22:06 REG_STRUCT_HAS_ADDR Mark Kettenis
2003-09-08 18:43 ` Andrew Cagney [this message]
2003-09-13 14:25 ` REG_STRUCT_HAS_ADDR Mark Kettenis
2003-09-13 15:01 ` REG_STRUCT_HAS_ADDR 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=3F5CCDDD.4010809@redhat.com \
--to=ac131313@redhat.com \
--cc=dan@debian.org \
--cc=gdb@sources.redhat.com \
--cc=kettenis@chello.nl \
/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