From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62410 invoked by alias); 18 Feb 2016 11:38:06 -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 62393 invoked by uid 89); 18 Feb 2016 11:38:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1238, HContent-Transfer-Encoding:8bit X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Feb 2016 11:38:05 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1aWMuH-0005Gq-48 from Luis_Gustavo@mentor.com ; Thu, 18 Feb 2016 03:38:01 -0800 Received: from [172.30.2.113] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Thu, 18 Feb 2016 03:38:00 -0800 Subject: Re: [PATCH 1/2] gdb: Add guess_tracepoint_registers hook to gdbarch. References: <20160216182754.CE86C6BEA@oc7340732750.ibm.com> <1455791730-28225-1-git-send-email-koriakin@0x04.net> To: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= , CC: , From: Luis Machado Reply-To: Luis Machado Message-ID: <56C5AD12.2070101@codesourcery.com> Date: Thu, 18 Feb 2016 11:38: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: <1455791730-28225-1-git-send-email-koriakin@0x04.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00534.txt.bz2 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].