diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-03-31 13:32:20 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-04 17:50:41 -0400 |
commit | 962937b15dd570e44109f3c8196a392b788837ba (patch) | |
tree | 4a2172585a6a63cb779f5bd269ad3a5a3528e8f3 /gdb/ui-file.h | |
parent | cb25fdbb76e41d9c02fe86009fc8a3ecf8737c9a (diff) | |
download | binutils-962937b15dd570e44109f3c8196a392b788837ba.zip binutils-962937b15dd570e44109f3c8196a392b788837ba.tar.gz binutils-962937b15dd570e44109f3c8196a392b788837ba.tar.bz2 |
gdb: make timestamped_file implement can_emit_style_escape
In our AMDGPU downstream port, we use styling in some logging output.
We noticed it stopped working after the gdb_printf changes. Making
timestamped_file implement can_emit_style_escape (returning the value of
the stream it wraps) fixes it. To show that it works, modify some
logging statements in auto-load.c to output style filenames. You can
see it in action by setting "set debug auto-load 1" and running a
program. We can incrementally add styling to other debug statements
throughout GDB, as needed.
Change-Id: I78a2fd1e078f80f2263251cf6bc53b3a9de9c17a
Diffstat (limited to 'gdb/ui-file.h')
-rw-r--r-- | gdb/ui-file.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ui-file.h b/gdb/ui-file.h index f8e1fe8..e420555 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -402,6 +402,9 @@ public: { } + bool can_emit_style_escape () override + { return m_stream->can_emit_style_escape (); } + DISABLE_COPY_AND_ASSIGN (timestamped_file); void write (const char *buf, long len) override; |