diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-04-19 15:46:51 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2024-04-19 16:30:25 -0400 |
commit | a887499c6b363aa97a6dd11807878ee9fa406e35 (patch) | |
tree | 35e4ecd3be58981694b47bc81a986b9aa2486e1f /gdb/utils.h | |
parent | 559798f82800e1d7a2ef8b86da4a0e169e07efee (diff) | |
download | gdb-a887499c6b363aa97a6dd11807878ee9fa406e35.zip gdb-a887499c6b363aa97a6dd11807878ee9fa406e35.tar.gz gdb-a887499c6b363aa97a6dd11807878ee9fa406e35.tar.bz2 |
gdb: make target debug functions return std::string
Change the functions in target-debug.h to return string representations
in an std::string, such that they don't need to know how the printing
part is done. This also helps the following patch that makes the debug
prints in debug_target one-liners.
Update target-delegates.c (through make-target-delegates.py) to do the
printing.
Add an overload of gdb_puts to avoid using `.c_str ()`.
Change-Id: I55cbff1c1b03a3b24a81740e34c6ad41ac4f8453
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index 9635089..f0189c7 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -205,6 +205,8 @@ extern void set_screen_width_and_height (int width, int height); extern void gdb_puts (const char *, struct ui_file *); +extern void gdb_puts (const std::string &s, ui_file *stream); + extern void gdb_putc (int c, struct ui_file *); extern void gdb_putc (int c); |