Re: [PATCH 1/2] gdb: Add guess_tracepoint_registers hook to gdbarch.

Luis Machado
2016-02-18T11:38:06Z

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].