From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24332 invoked by alias); 24 Mar 2003 17:33:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24325 invoked from network); 24 Mar 2003 17:33:59 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 24 Mar 2003 17:33:59 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18xXj6-0004iP-00; Mon, 24 Mar 2003 13:35:20 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18xVpZ-0006LG-00; Mon, 24 Mar 2003 12:33:53 -0500 Date: Mon, 24 Mar 2003 17:33:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch rfc] PUSH_ARGUMENTS() -> push_dummy_call() Message-ID: <20030324173353.GA23605@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <3E7E977A.5080302@redhat.com> <20030324141924.GA25455@nevyn.them.org> <3E7F3A85.3000100@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E7F3A85.3000100@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00474.txt.bz2 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