Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch rfc] PUSH_ARGUMENTS() -> push_dummy_call()
Date: Mon, 24 Mar 2003 17:33:00 -0000	[thread overview]
Message-ID: <20030324173353.GA23605@nevyn.them.org> (raw)
In-Reply-To: <3E7F3A85.3000100@redhat.com>

On Mon, Mar 24, 2003 at 12:04:05PM -0500, Andrew Cagney wrote:
> >While you're rearranging this code,
> 
> Think of it as `shuffling deck chairs'.  It is still the same Titanic.
> 
> >  I'd like your thoughts on
> >something.  I was working on an old project last week - "catch catch"
> >and "catch throw".  A basic implementation is easy.  A more interesting
> >implementation, however, requires being able to extract the arguments
> >to __cxa_throw (one of the arguments is the object being thrown,
> >another is the typeinfo for it).
> 
> Have a look at objc-lang.c:FETCH_ARGUMENTS().  I suspect it should be 
> called FETCH_POINTER_ARGUMENT(frame, i).

Egads, that's disgusting.

> >This requires being able to figure out where a function which takes two
> >pointers expects them to be.  __cxa_throw will generally not have any
> >debug info.  This logic already exists in the push argument code.
> 
> While that method contains the relevant logic, I don't think it is 
> easily accessible.

You're probably right.

> >Is it too much overhead/PITA to restructure it so that we can use that
> >information?  If so I'll probably need to add a new architecture method
> >to get ths sort of information.
> 
> It is definitly beyond the scope of these cleanups.  The interface is 
> going to be sufficiently different to need a new architecture method anyway.
> 
> Would a FETCH_POINTER_ARGUMENT() method be sufficient for your immediate 
> needs?

Yes!  Thanks for the pointer.  I'll put together a patch to move it
into the architecture vector, for those architectures where it has a
clear implementation.  And try to write up some mostly-accurate
documentation for what it does...

Basically, it should work as long as the previous N arguments were all
pointers, and for reasonably small values of N (objc-lang never goes
above N == 2 I think).

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-03-24 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  5:28 Andrew Cagney
2003-03-24 14:19 ` Daniel Jacobowitz
2003-03-24 17:04   ` Andrew Cagney
2003-03-24 17:33     ` Daniel Jacobowitz [this message]
2003-03-25 20:05       ` Andrew Cagney
2003-03-24 18:18 ` Eli Zaretskii
2003-03-26 22:41   ` 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=20030324173353.GA23605@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.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