From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6879 invoked by alias); 27 Mar 2003 15:53:57 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6872 invoked from network); 27 Mar 2003 15:53:57 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 27 Mar 2003 15:53:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B9B362B23; Thu, 27 Mar 2003 10:53:55 -0500 (EST) Message-ID: <3E831E93.6010803@redhat.com> Date: Thu, 27 Mar 2003 15:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Fedor Cc: gdb@sources.redhat.com Subject: Re: objc-lang.c portability (Was Re: [PATCH] Step over Objective-C dispatch function) References: <0E3D4316-5FE3-11D7-8F82-000A277AC1A4@doc.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00373.txt.bz2 > > On Thursday, March 20, 2003, at 02:08 PM, Andrew Cagney wrote: > > I've looked at what the underlying code is trying to do and, unfortunatly, the original objc-lang.c botched its portability(1), sigh! The file is currently native only so infrun.c can't directly refer to objc-lang.c, and hence, will need to go via a dispatch table. Going via a dispatch table wouldn't hurt anyway. > > (1) I noticed that the parameter extract methods assume host=target. > > > I'm wondering what's not portable with objc-lang.c? With the remaining patches I have that require this, I was thinking it might be easier to just fix it now. The alternative appears to be adding a whole bunch of things to the language_defn structure. I admit I don't really understand the problem though. Both getting objc-lang.c portable and extending the language vector are things that will, one day, need to be done :-/ My guess is that it will be quicker, and lower risk, to attack the language vector side of the problem then to more slowly audit / fix the portability problems. This will at least make it possible to enable objc for one or two key native systems (e.g., i386 GNU/Linux). Language vector additions are largly a case of changing this: switch (current_language) case C: do something C like; case C++: do something C++ like; ... into something like: switch (current_language) ... default: current_language->do something language like; which is very mechanical. There is plenty of prior art so approval is pretty mechanical. Contrast it to the problem DanielJ pointed out (and I hinted at): > At the very least FETCH_ARGUMENT and CONVERT_FUNCPTR need to go into > the architecture vector. As they stand, these new methods won't go into the architecture vector. Adding a new architecture method requires care and consideration, and for the above, they will definitly need change. Andrew