From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64744 invoked by alias); 18 Feb 2016 11:39:35 -0000 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 Received: (qmail 64720 invoked by uid 89); 18 Feb 2016 11:39:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Feb 2016 11:39:33 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 06E543FE37; Thu, 18 Feb 2016 12:40:23 +0100 (CET) Received: from [192.168.1.62] (84-10-2-59.static.chello.pl [84.10.2.59]) by hogfather.0x04.net (Postfix) with ESMTPSA id 166E058008A; Thu, 18 Feb 2016 12:39:24 +0100 (CET) Subject: Re: [PATCH 1/2] gdb: Add guess_tracepoint_registers hook to gdbarch. To: Luis Machado , uweigand@de.ibm.com References: <20160216182754.CE86C6BEA@oc7340732750.ibm.com> <1455791730-28225-1-git-send-email-koriakin@0x04.net> <56C5AD12.2070101@codesourcery.com> Cc: arnez@linux.vnet.ibm.com, gdb-patches@sourceware.org From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56C5AD6B.8060607@0x04.net> Date: Thu, 18 Feb 2016 11:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56C5AD12.2070101@codesourcery.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00535.txt.bz2 On 18/02/16 12:37, Luis Machado wrote: > On 02/18/2016 08:35 AM, Marcin Kościelnicki wrote: >> When we're looking at a tracefile trace frame where registers are not >> available, and the tracepoint has only one location, we supply >> the location's address as the PC register. However, this only works >> if PC is not a pseudo register, and individual architectures may want >> to guess more registers. Add a gdbarch hook that will handle that. >> >> gdb/ChangeLog: >> >> * gdbarch.c: Regenerate. >> * gdbarch.h: Regenerate. >> * gdbarch.sh: Add guess_tracepoint_registers hook, struct tracepoint >> declaration, and tracepoint.h include. >> * tracefile.c (tracefile_fetch_registers): Use the new gdbarch hook. >> * tracepoint.c (default_guess_tracepoint_registers): New function. >> * tracepoint.h (default_guess_tracepoint_registers): New prototype. > >> diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h >> index 3fadcd1..be0e7e3 100644 >> --- a/gdb/gdbarch.h >> +++ b/gdb/gdbarch.h >> @@ -64,6 +64,7 @@ struct elf_internal_linux_prpsinfo; >> struct mem_range; >> struct syscalls_info; >> struct thread_info; >> +struct tracepoint; >> > > Is this declaration needed here? struct tracepoint doesn't seem to be > used anywhere in gdbarch.[c|h]. > Whoops, that's s leftover from a version that passed a struct tracepoint, I'll fix that.