From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5470 invoked by alias); 19 Jun 2003 14:48:08 -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 5429 invoked from network); 19 Jun 2003 14:48:07 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 19 Jun 2003 14:48:07 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id KAA22606; Thu, 19 Jun 2003 10:41:17 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id KAA29373; Thu, 19 Jun 2003 10:48:06 -0400 Message-ID: <04f201c33671$d9a92090$0202040a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: "Gdb-Patches@Sources.Redhat.Com" References: <08c201c334e6$ccb8c750$0202040a@catdog> <20030617155147.GA25280@nevyn.them.org> <08d801c334ea$23fd99c0$0202040a@catdog> <047501c3365d$f809dc00$0202040a@catdog> <20030619131834.GA23704@nevyn.them.org> Subject: Re: [Patch] arch recognition fix for osabi.c Date: Thu, 19 Jun 2003 14:48:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-06/txt/msg00628.txt.bz2 I just thought of a way to rephrase the problem somewhat. Given that I've registered an osabi handler for mips that is NOT getting run when the arch changes to another mips machine, what method would you suggest I use to ensure that ntomips_init_osabi() gets run? My handler setup for mips is this: gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_QNXNTO, mipsnto_init_abi); Should I perhaps be registering this for all the possible mips targets that we want? That is, make calls for 0, 3900, 4100, 4111, 4300, 4600, 4650, 5000, 8000, 10000? cheers, Kris > I'm still not convinced. I'm keeping your last message around until I > have a chance to examine what the compatible functions are really > doing. > > On Thu, Jun 19, 2003 at 08:26:11AM -0400, Kris Warkentin wrote: > > Daniel, did you have any further spare brain cycles to consider my argument? > > > > cheers, > > > > Kris > > > > > > > Changelog: > > > > > * osabi.c (gdbarch_init_osabi): Just check arch for compatability > > > rather > > > > > identicality. > > > > > > > > Your mailer is eating indentation again... > > > > > > Yeah. It's fine in the editor - it's the cut and paste to Outlook that > > > buggers it. > > > > > > > This half I'm not convinced by. From our previous exchange I don't > > > > think you've fully justified it. Not approved without more discussion. > > > > > > Okay. Let's use mips as an example. The 'compatible' check returns true > > if > > > they have the same arch (ie. bfd_arch_mips). There will be many different > > > values for the arch_info pointer, all with bfd_arch_mips and various other > > > pieces of info such as which machine type (10k, 4300, etc.) of mips it is. > > > The handler was registered for bfd_arch_mips with no other information. > > In > > > the absence of the ABILITY to do anything smarter, we have to assume that > > if > > > the handler is for bfd_arch_mips, it should be run. > > > > > > As it stands, if the bfd reads a file and says 'this is a tx3900' or some > > > such, the pointers won't be the same and my backend init_abi won't be run > > > even though I want it to run for all mips targets. > > > > > > > > (generic_elf_osabi_sniff_abi_tag_sections): Add check for QNX > > > Neutrino > > > > > binaries. > > > > > > > > This bit looks fine, except for two things: you've missed the coding > > > > standards by four space characters (before left parens), and your > > > > "safety first" check overruns the buffer (missing +1 in the alloca). > > > > > > Doh! Not very safe was it? Sorry about that. Fixed. > > > > > > cheers, > > > > > > Kris > > > > > > > > > > > > > > > > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer >