From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9616 invoked by alias); 23 Dec 2004 16:43:49 -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 9593 invoked from network); 23 Dec 2004 16:43:42 -0000 Received: from unknown (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 23 Dec 2004 16:43:42 -0000 Received: from [10.12.2.12] (dhcpb12.ott.qnx.com [10.12.2.12]) by nimbus.ott.qnx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id ZPD3QKBD; Thu, 23 Dec 2004 11:43:31 -0500 Message-ID: <41CAF4EC.3040804@qnx.com> Date: Thu, 23 Dec 2004 17:12:00 -0000 From: Kris Warkentin User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) MIME-Version: 1.0 To: "M.M. Kettenis" CC: gdb-patches@sources.redhat.com Subject: Re: [patch] remove deprecated core support from QNX NTO References: <73193856100971104@weblx058.utsp.utwente.nl> In-Reply-To: <73193856100971104@weblx058.utsp.utwente.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00428.txt.bz2 M.M. Kettenis wrote: >>regs since our kernel just uses the opcode to push them in the normal >>order. Unfortunately though, our gpregs are in a different order and >>not all of them are there so we have some unique mappings. >> >> > >QNX NTO is in no way special about this. I was thinking about something >like the attached patch. Could you test that one? This approach simply >reduces the amount of code needed. > > Looks good. I didn't know the i386-tdep had the mapping ability. Do other arches have that as well? I'm assuming you meant to return the value here: static int nto_reg_offset (int regnum) { if (regnum >= 0 && regnum < ARRAY_SIZE (i386nto_gregset_reg_offset)) i386nto_gregset_reg_offset[regnum]; ^^^^ return? return -1; } When I run an app, it's dumping core in i386_supply_gregset because tdep->regset is not initialized. Not quite sure what the proper way to do that is. Still investigating. >The patch also contains a unrelated change to the shared library code. >It also removes a unneeded function. But it'd be nice if you could test >that I didn't mess things up. > > Thanks for all the help Mark. I'm always a big fan of eliminating redundant code. cheers, Kris