]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: convert linux-namespaces debug to the new(er) debug scheme
authorAndrew Burgess <aburgess@redhat.com>
Wed, 11 Jun 2025 09:20:17 +0000 (10:20 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 12 Jun 2025 10:06:51 +0000 (11:06 +0100)
commitadd73a101f5e8225d4055563c52adaa64c8fb11d
tree13a9c8999a321286bbeb4289d287285937d85492
parentf9a37571ba647927c4f37706fe69fba8f69339dd
gdb: convert linux-namespaces debug to the new(er) debug scheme

Convert 'set debug linux-namespaces' to the new(er) debug scheme.  As
part of this change I converted the mnsh_debug_print_message function,
which previously printed its output, to instead return a std::string,
this string is then printed using linux_namespaces_debug_printf.  The
mnsh_debug_print_message function is only used as part of the debug
output.

I also updated one place in the code where debug_linux_namespaces, the
debug control variable, which is a boolean, was assigned an integer.

When debug is turned on then clearly the output is now different, but
in all other cases, there should be no user visible change in GDB
after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/nat/linux-namespaces.c
gdb/nat/linux-namespaces.h