From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23424 invoked by alias); 17 Jun 2009 01:30:17 -0000 Received: (qmail 23409 invoked by uid 22791); 17 Jun 2009 01:30:14 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 01:30:09 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1MGjyU-000818-9o for gdb-patches@sources.redhat.com; Wed, 17 Jun 2009 01:30:02 +0000 Received: from cpe0019e26b2db7-cm001692f4e452.cpe.net.cable.rogers.com ([99.224.129.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Jun 2009 01:30:02 +0000 Received: from aristovski by cpe0019e26b2db7-cm001692f4e452.cpe.net.cable.rogers.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Jun 2009 01:30:02 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: [patch] gdbserver regcache fetch all regs Date: Wed, 17 Jun 2009 01:30:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060507090406090902080708" User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00427.txt.bz2 This is a multi-part message in MIME format. --------------060507090406090902080708 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 328 Hello, I believe this is a bug in gdbserver/regcache.c Current code fetches regno 0 and marks regcache valid. I believe correct should be: fetch all regs, and mark regache valid. Thanks, -- Aleksandar Ristovski QNX Software Systems ChangeLog: * regcache.c (get_regcache): Fetch all registers instead of regno 0 only. --------------060507090406090902080708 Content-Type: text/x-patch; name="gdbserver-regcache.c-fetchallregs-20090616.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdbserver-regcache.c-fetchallregs-20090616.diff" Content-length: 556 Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/regcache.c,v retrieving revision 1.19 diff -u -p -r1.19 regcache.c --- regcache.c 22 Mar 2009 23:57:10 -0000 1.19 +++ regcache.c 17 Jun 2009 01:21:03 -0000 @@ -53,7 +53,7 @@ get_regcache (struct thread_info *inf, i /* FIXME - fetch registers for INF */ if (fetch && regcache->registers_valid == 0) { - fetch_inferior_registers (0); + fetch_inferior_registers (-1); regcache->registers_valid = 1; } --------------060507090406090902080708--