From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14575 invoked by alias); 23 Nov 2010 00:53:05 -0000 Received: (qmail 14561 invoked by uid 22791); 23 Nov 2010 00:53:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_EG,TW_QE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Nov 2010 00:52:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7672B2BABDF; Mon, 22 Nov 2010 19:52:50 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5X545i-0utc1; Mon, 22 Nov 2010 19:52:50 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 46FDE2BAB60; Mon, 22 Nov 2010 19:52:50 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 0D6DE1457E1; Mon, 22 Nov 2010 16:52:47 -0800 (PST) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [commit] ravenscar/sparc: cannot fetch registers from non-active thread Date: Tue, 23 Nov 2010 00:53:00 -0000 Message-Id: <1290473565-32249-1-git-send-email-brobecker@adacore.com> 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: 2010-11/txt/msg00320.txt.bz2 This is one stupid mistake that snuck in, and I have no idea how. In any case, we were passing the address of the buffer instead of the buffer itself, leading to problem while trying to fetch registers from the non-active thread in the ravenscar application. gdb/ChangeLog: * ravenscar-sparc-thread.c (supply_register_at_address): Fix passing of buf in call to regcache_raw_supply. Tested on a leon-elf qemu target. Checked in. --- gdb/ChangeLog | 5 +++++ gdb/ravenscar-sparc-thread.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 314753b..b99f302 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-11-22 Joel Brobecker + + * ravenscar-sparc-thread.c (supply_register_at_address): + Fix passing of buf in call to regcache_raw_supply. + 2010-11-22 Jan Kratochvil * dwarf2read.c (dwarf2_read_index): Ignore higher .gdb_index versions. diff --git a/gdb/ravenscar-sparc-thread.c b/gdb/ravenscar-sparc-thread.c index 197b745..c799e79 100644 --- a/gdb/ravenscar-sparc-thread.c +++ b/gdb/ravenscar-sparc-thread.c @@ -69,7 +69,7 @@ supply_register_at_address (struct regcache *regcache, int regnum, buf = (char *) alloca (buf_size); read_memory (register_addr, buf, buf_size); - regcache_raw_supply (regcache, regnum, &buf); + regcache_raw_supply (regcache, regnum, buf); } /* Return true if, for a non-running thread, REGNUM has been saved on the -- 1.7.1