diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-26 13:41:36 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-12-29 10:40:10 -0700 |
commit | d68510ac191cb8b4b662a5fd1f3bcf9f4b136971 (patch) | |
tree | ab8d361f18255facf28e086d9a102515e123fa13 /gdb/aarch64-tdep.c | |
parent | 0fed74615b0f263c359a13a7a17ade36a986ddd1 (diff) | |
download | binutils-d68510ac191cb8b4b662a5fd1f3bcf9f4b136971.zip binutils-d68510ac191cb8b4b662a5fd1f3bcf9f4b136971.tar.gz binutils-d68510ac191cb8b4b662a5fd1f3bcf9f4b136971.tar.bz2 |
Use correct stream for process record output
The process record code often emits unfiltered output. In some cases,
this output ought to go to gdb_stderr (but see below). In other
cases, the output is guarded by a logging variable and so ought to go
to gdb_stdlog. This patch makes these changes.
Note that in many cases, the output to stderr is followed by a
"return -1", which is how process record indicates an error. It seems
to me that calling error here would be preferable, because, in many
cases, that's all the caller does when it sees a -1. However, I
haven't made this change.
This is part of PR gdb/7233.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=7233
Diffstat (limited to 'gdb/aarch64-tdep.c')
-rw-r--r-- | gdb/aarch64-tdep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 3287499..1dd5a51 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -4657,10 +4657,11 @@ aarch64_process_record (struct gdbarch *gdbarch, struct regcache *regcache, ret = aarch64_record_decode_insn_handler (&aarch64_record); if (ret == AARCH64_RECORD_UNSUPPORTED) { - printf_unfiltered (_("Process record does not support instruction " - "0x%0x at address %s.\n"), - aarch64_record.aarch64_insn, - paddress (gdbarch, insn_addr)); + fprintf_unfiltered (gdb_stderr, + _("Process record does not support instruction " + "0x%0x at address %s.\n"), + aarch64_record.aarch64_insn, + paddress (gdbarch, insn_addr)); ret = -1; } |