This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb/tracepoint.c: Don't use printf_vma
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 16 Nov 2016 20:17:42 -0500
- Subject: [binutils-gdb] gdb/tracepoint.c: Don't use printf_vma
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 19f1935d91bfabbe4176ffdaca95bc789b593153 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 19f1935d91bfabbe4176ffdaca95bc789b593153
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.