diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-17 00:23:17 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-17 00:23:17 +0000 |
commit | 19f1935d91bfabbe4176ffdaca95bc789b593153 (patch) | |
tree | 5845f5dfa4b87cfa60a3b5b5a30f55ecb4ec4339 /gdb/tracepoint.h | |
parent | fa98319231a95aca0313878443143d3f92aca5e1 (diff) | |
download | binutils-gdb-19f1935d91bfabbe4176ffdaca95bc789b593153.tar.gz |
gdb/tracepoint.c: Don't use printf_vma
I noticed that bfd's printf_vma prints to stdout directly:
bfd-in2.h:202:#define printf_vma(x) fprintf_vma(stdout,x)
This is a bad idea in gdb, where we should use
gdb_stdout/gdb_stderr/gdb_stdlog, etc., to support redirection.
Eliminate uses of sprintf_vma too while at it.
Tested on Fedora 23, w/ gdbserver.
gdb/ChangeLog:
2016-11-17 Pedro Alves <palves@redhat.com>
* tracepoint.c (collection_list::add_memrange): Add gdbarch
parameter. Use paddress instead of printf_vma. Adjust recursive
calls.
(collection_list::stringify): Use paddress and phex_nz instead of
sprintf_vma. Adjust add_memrange call.
* tracepoint.h (collection_list::add_memrange): Add gdbarch
parameter.
Diffstat (limited to 'gdb/tracepoint.h')
-rw-r--r-- | gdb/tracepoint.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h index 855bb1da030..36eeee60f21 100644 --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h @@ -252,7 +252,8 @@ public: void add_aexpr (agent_expr_up aexpr); void add_register (unsigned int regno); - void add_memrange (int type, bfd_signed_vma base, + void add_memrange (struct gdbarch *gdbarch, + int type, bfd_signed_vma base, unsigned long len); void collect_symbol (struct symbol *sym, struct gdbarch *gdbarch, |