From f93a04010a06aa7f6793b7c0d28d31aaba9520fa Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Wed, 20 Mar 2024 23:12:11 +0700 Subject: emu/debug/debugcmd.cpp: Add NUL-terminated string argument support to printf/logerror. (#12124) * Use %s to read NUL-terminated strings from emulated memory. Precision sets maximum length. * Also added left-justification option for numeric and string formats. * Made documentation more consistent and removed duplication. --- docs/source/debugger/general.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'docs/source') diff --git a/docs/source/debugger/general.rst b/docs/source/debugger/general.rst index 13060894aae..c01ef20dea8 100644 --- a/docs/source/debugger/general.rst +++ b/docs/source/debugger/general.rst @@ -190,18 +190,22 @@ available: %c Prints the corresponding argument as an 8-bit character. -%[0][]d +%[-][0][]d Prints the corresponding argument as a decimal number with optional - minimum field width and zero fill. -%[0][]o + left justification, zero fill and minimum field width. +%[-][0][]o Prints the corresponding argument as an octal number with optional - minimum field width and zero fill using lowercase letters. -%[0][]x - Prints the corresponding argument as a hexadecimal number with - optional minimum field width and zero fill using lowercase letters. -%[0][]X - Prints the corresponding argument as a hexadecimal number with - optional minimum field width and zero fill using uppercase letters. + left justification, zero fill and minimum field width. +%[-][0][]x + Prints the corresponding argument as a lowercase hexadecimal number + with optional left justification, zero fill and minimum field width. +%[-][0][]X + Prints the corresponding argument as an uppercase hexadecimal number + with optional left justification, zero fill and minimum field width. +%[-][][.[]]s + Prints a null-terminated string of 8-bit characters from the address + and address space given by the corresponding argument, with optional + left justification, minimum and maximum field widths. \%% Prints a literal percent symbol. \\n -- cgit v1.2.3-70-g09d2