]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make target debug functions return std::string
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 19 Apr 2024 19:46:51 +0000 (15:46 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 19 Apr 2024 20:30:25 +0000 (16:30 -0400)
commita887499c6b363aa97a6dd11807878ee9fa406e35
tree35e4ecd3be58981694b47bc81a986b9aa2486e1f
parent559798f82800e1d7a2ef8b86da4a0e169e07efee
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>
gdb/make-target-delegates.py
gdb/target-debug.h
gdb/target-delegates.c
gdb/utils.c
gdb/utils.h