From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20596 invoked by alias); 20 May 2003 21:35:35 -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 20583 invoked from network); 20 May 2003 21:35:35 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 20 May 2003 21:35:35 -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 RAA04758 for ; Tue, 20 May 2003 17:31:33 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id RAA07462 for ; Tue, 20 May 2003 17:35:34 -0400 Message-ID: <0b4301c31f17$c4ada8d0$0202040a@catdog> From: "Kris Warkentin" To: "Gdb-Patches@Sources.Redhat.Com" Subject: [patch] QNX core file reading fix Date: Tue, 20 May 2003 21:35: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-05/txt/msg00375.txt.bz2 We were switching on our own regset numbers rather than gdb's. Applied as obvious. cheers, Kris ChangeLog: * nto-tdep.c (fetch_core_registers): Match gdb's idea of regset numbering rather than our own. Index: nto-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/nto-tdep.c,v retrieving revision 1.4 diff -u -r1.4 nto-tdep.c --- nto-tdep.c 12 May 2003 19:11:51 -0000 1.4 +++ nto-tdep.c 20 May 2003 21:33:26 -0000 @@ -269,24 +269,19 @@ int which, CORE_ADDR reg_addr) { nto_regset_t regset; - - if (which == NTO_REG_GENERAL) + +/* See corelow.c:get_core_registers for values of WHICH. */ + if (which == 0) { memcpy ((char *) ®set, core_reg_sect, min (core_reg_size, sizeof (regset))); nto_supply_gregset ((char *) ®set); } - else if (which == NTO_REG_FLOAT) + else if (which == 2) { memcpy ((char *) ®set, core_reg_sect, min (core_reg_size, sizeof (regset))); nto_supply_fpregset ((char *) ®set); - } - else if (which == NTO_REG_ALT) - { - memcpy ((char *) ®set, core_reg_sect, - min (core_reg_size, sizeof (regset))); - nto_supply_altregset ((char *) ®set); } }