From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23927 invoked by alias); 10 Jun 2003 10:12: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 23674 invoked from network); 10 Jun 2003 10:12:51 -0000 Received: from unknown (HELO cam-admin0.cambridge.arm.com) (193.131.176.54) by sources.redhat.com with SMTP; 10 Jun 2003 10:12:51 -0000 Received: from pc960.cambridge.arm.com (pc960.cambridge.arm.com [10.1.205.4]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id LAA11470; Tue, 10 Jun 2003 11:12:47 +0100 (BST) Received: from pc960.cambridge.arm.com (rearnsha@localhost) by pc960.cambridge.arm.com (8.11.6/8.9.3) with ESMTP id h5AAClK01881; Tue, 10 Jun 2003 11:12:47 +0100 Message-Id: <200306101012.h5AAClK01881@pc960.cambridge.arm.com> X-Authentication-Warning: pc960.cambridge.arm.com: rearnsha owned process doing -bs To: "Kris Warkentin" cc: "Kevin Buettner" , "Gdb@Sources.Redhat.Com" , Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: problem with fetch_link_map_offsets In-reply-to: Your message of "Mon, 09 Jun 2003 17:40:50 EDT." <037201c32ecf$cb8e1460$0202040a@catdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Jun 2003 10:12:00 -0000 From: Richard Earnshaw X-SW-Source: 2003-06/txt/msg00152.txt.bz2 > > > Say, for example, I go into arm-tdep.c and comment out the section that > > > registers a gdbarch osabi sniffer. Now my arm port works fine: it uses > > > GDB_OSABI_QNXNTO and everything is hunky-dory. So the problem is that > the > > > sniffer says, "Oh, it's GDB_OSABI_ARM_APCS, let's set that up." and then > all > > > of my init stuff is out the door. > > > > > > The question is, how do I deal with this? There is nothing to > distinguish a > > > Neutrino binary from any other elf file. I tried registering another > > > sniffer that just returned GDB_OSABI_QNXNTO but then it squawked that it > got > > > two osabi results. I'm assuming that this is probably what I'm running > into > > > on all my targets. > > > > It sounds to me like the problem is with the sniffer(s). If the sniffer > > is determining GDB_OSABI_ARM_APCS for a QNX binary, that's bad and the > > sniffer ought to be fixed. > > Yeah but....a QNX binary is just an ordinary elf binary. There are no > special sections or magic in there for the sniffer to catch. Hence my > problem. Perhaps it should be returning unknown so that another sniffer > (like my one liner) could get it? > NetBSD binaries look like ordinary ELF too, as do Linux. The only way to resolve this is to arange for the crt0.o file to contain some magic that GDB can find. Normally this is a special .note section. Can you not arrange for QNX binaries to have such a note and then add that. R.