gdb: move debug_prefixed_vprintf here

The following patch needs to output debug prints from gdbsupport code.
Move debug_prefixed_vprintf so that it is possible to use it from
gdbsupport.

gdb/ChangeLog:

	* debug.c (debug_prefixed_vprintf): Move to gdbsupport.
	* debug.h: Remove.
	* infrun.c: Include gdbsupport/common-debug.h.
	* linux-nat.c: Likewise.

gdbsupport/ChangeLog:

	* common-debug.cc (debug_prefixed_vprintf): Move here.
	* common-debug.h (debug_prefixed_vprintf): Move here.

Change-Id: I5170065fc10a7a49c0f1bba67c691decb2cf3bcb
This commit is contained in:
Simon Marchi
2020-10-02 14:44:39 -04:00
committed by Simon Marchi
parent db20ebdfae
commit ba98841943
8 changed files with 32 additions and 46 deletions

View File

@@ -35,3 +35,14 @@ debug_printf (const char *fmt, ...)
debug_vprintf (fmt, ap);
va_end (ap);
}
/* See gdbsupport/common-debug.h. */
void
debug_prefixed_vprintf (const char *module, const char *func, const char *format,
va_list args)
{
debug_printf ("[%s] %s: ", module, func);
debug_vprintf (format, args);
debug_printf ("\n");
}