From b2e11d00e04db9d62fc2c2c8d50b797c28fcd4a9 Mon Sep 17 00:00:00 2001 From: Firehawke <34792592+Firehawke@users.noreply.github.com> Date: Mon, 5 Feb 2018 02:27:02 -0700 Subject: More docs work: escapes, debugger update (nw) (#3168) * Missed a couple escape sequences. (nw) * A little more escaping, acronym fixes, fix oddity in symlist (nw) * Update debugger internal help to match docs (nw) * Lowercasing for CPU in command parameters, fix casing on ASCII. (nw) --- src/emu/debug/debughlp.cpp | 154 +++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 75 deletions(-) (limited to 'src/emu/debug/debughlp.cpp') diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp index 4eff7e4e8e4..9f5d8ad133e 100644 --- a/src/emu/debug/debughlp.cpp +++ b/src/emu/debug/debughlp.cpp @@ -79,7 +79,7 @@ static const help_item static_help_list[] = "\n" " help [] -- get help on a particular topic\n" " do -- evaluates the given expression\n" - " symlist [] -- lists registered symbols\n" + " symlist [] -- lists registered symbols\n" " softreset -- executes a soft reset\n" " hardreset -- executes a hard reset\n" " print [,...] -- prints one or more s to the console\n" @@ -87,12 +87,12 @@ static const help_item static_help_list[] = " logerror [,[,...]] -- outputs one or more s to the error.log\n" " tracelog [,[,...]] -- outputs one or more s to the trace file using \n" " tracesym [,...]] -- outputs one or more s to the trace file\n" - " history [,] -- outputs a brief history of visited opcodes\n" - " trackpc [,,] -- visually track visited opcodes [boolean to turn on and off, for the given cpu, clear]\n" + " history [,] -- outputs a brief history of visited opcodes\n" + " trackpc [,,] -- visually track visited opcodes [boolean to turn on and off, for the given CPU, clear]\n" " trackmem [,] -- record which PC writes to each memory address [boolean to turn on and off, clear]\n" - " pcatmemp
[,] -- query which PC wrote to a given program memory address for the current CPU\n" - " pcatmemd
[,] -- query which PC wrote to a given data memory address for the current CPU\n" - " pcatmemi
[,] -- query which PC wrote to a given I/O memory address for the current CPU\n" + " pcatmemp
[,] -- query which PC wrote to a given program memory address for the current CPU\n" + " pcatmemd
[,] -- query which PC wrote to a given data memory address for the current CPU\n" + " pcatmemi
[,] -- query which PC wrote to a given I/O memory address for the current CPU\n" " (Note: you can also query this info by right clicking in a memory window\n" " rewind[rw] -- go back in time by loading the most recent rewind state" " statesave[ss] -- save a state file for the current driver\n" @@ -107,19 +107,19 @@ static const help_item static_help_list[] = "Memory Commands\n" "Type help for further details on each command\n" "\n" - " dasm ,
,[,[,]] -- disassemble to the given file\n" + " dasm ,
,[,[,]] -- disassemble to the given file\n" " f[ind]
,[,[,...]] -- search program memory for data\n" " f[ind]d
,[,[,...]] -- search data memory for data\n" " f[ind]i
,[,[,...]] -- search I/O memory for data\n" - " dump ,
,[,[,[,]]] -- dump program memory as text\n" - " dumpd ,
,[,[,[,]]] -- dump data memory as text\n" - " dumpi ,
,[,[,[,]]] -- dump I/O memory as text\n" - " save ,
,[,] -- save binary program memory to the given file\n" - " saved ,
,[,] -- save binary data memory to the given file\n" - " savei ,
,[,] -- save binary I/O memory to the given file\n" - " load ,
[,,] -- load binary program memory from the given file\n" - " loadd ,
[,,] -- load binary data memory from the given file\n" - " loadi ,
[,,] -- load binary I/O memory from the given file\n" + " dump ,
,[,[,[,]]] -- dump program memory as text\n" + " dumpd ,
,[,[,[,]]] -- dump data memory as text\n" + " dumpi ,
,[,[,[,]]] -- dump I/O memory as text\n" + " save ,
,[,] -- save binary program memory to the given file\n" + " saved ,
,[,] -- save binary data memory to the given file\n" + " savei ,
,[,] -- save binary I/O memory to the given file\n" + " load ,
[,,] -- load binary program memory from the given file\n" + " loadd ,
[,,] -- load binary data memory from the given file\n" + " loadi ,
[,,] -- load binary I/O memory from the given file\n" " map
-- map logical program address to physical address and bank\n" " mapd
-- map logical data address to physical address and bank\n" " mapi
-- map logical I/O address to physical address and bank\n" @@ -139,11 +139,11 @@ static const help_item static_help_list[] = " gt[ime] -- resumes execution until the given delay has elapsed\n" " gv[blank] -- resumes execution, setting temp breakpoint on the next VBLANK (F8)\n" " n[ext] -- executes until the next CPU switch (F6)\n" - " focus -- focuses debugger only on \n" - " ignore [[,[,...]]] -- stops debugging on \n" - " observe [[,[,...]]] -- resumes debugging on \n" - " trace {|OFF}[,[,[,]]] -- trace the given CPU to a file (defaults to active CPU)\n" - " traceover {|OFF}[,[,[,]]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n" + " focus -- focuses debugger only on \n" + " ignore [[,[,...]]] -- stops debugging on \n" + " observe [[,[,...]]] -- resumes debugging on \n" + " trace {|OFF}[,[,[,]]] -- trace the given CPU to a file (defaults to active CPU)\n" + " traceover {|OFF}[,[,[,]]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n" " traceflush -- flushes all open trace files\n" }, { @@ -171,7 +171,7 @@ static const help_item static_help_list[] = " wpdisable [] -- disables a given watchpoint or all if no specified\n" " wpenable [] -- enables a given watchpoint or all if no specified\n" " wplist -- lists all the watchpoints\n" - " hotspot [,[[,]]] -- attempt to find hotspots\n" + " hotspot [,[[,]]] -- attempt to find hotspots\n" }, { "registerpoints", @@ -209,15 +209,22 @@ static const help_item static_help_list[] = " = *= /= %= += -= <<= >>= &= |= ^= : assignment\n" " , : separate terms, function parameters\n" "\n" - "These are the differences from C behaviors. First, All math is performed on full 64-bit unsigned " - "values, so things like a < 0 won't work as expected. Second, the logical operators && and || do " - "not have short-circuit properties -- both halves are always evaluated. Finally, the new memory " - "operators work like this: b@ refers to the byte read from . Similarly, w@ refers to " - "a word in memory, d@ refers to a dword in memory, and q@ refers to a qword in memory. The memory " - "operators can be used as both lvalues and rvalues, so you can write b@100 = ff to store a byte " - "in memory. By default these operators read from the program memory space, but you can override " - "that by prefixing them with a 'd' or an 'i'. So dw@300 refers to data memory word at address " - "300 and id@400 refers to an I/O memory dword at address 400.\n" + "These are the differences from C behaviors:\n" + "\n" + "First, all math is performed on full 64-bit unsigned values, so things like a < 0 won't work " + "as expected.\n" + "Second, the logical operators && and || do not have short-circuit properties -- both halves are " + "always evaluated.\n" + "Finally, the new memory operators work like this:\n" + "b@ refers to the byte at while suppressing side effects.\n" + "Similarly, w@ and w! refer to a word in memory, d@ and d! refer to a dword in memory, and " + "q@ and q! refer to a qword in memory.\n" + "The memory operators can be used as both lvalues and rvalues, so you can write b@100 = ff to " + "store a byte in memory. By default these operators read from the program memory space, but you " + "can override that by prefixing them with a 'd' or an 'i'.\n" + "As such, dw@300 refers to data memory word at address 300 and id@400 refers to an I/O memory " + "dword at address 400.\n" + }, { "comments", @@ -238,7 +245,7 @@ static const help_item static_help_list[] = "Cheat Commands\n" "Type help for further details on each command\n" "\n" - " cheatinit [
,[,]] -- initialize the cheat search to the selected memory area\n" + " cheatinit [
,[,]] -- initialize the cheat search to the selected memory area\n" " cheatrange
, -- add to the cheat search the selected memory area\n" " cheatnext [,] -- continue cheat search comparing with the last value\n" " cheatnextf [,] -- continue cheat search comparing with the first value\n" @@ -271,10 +278,10 @@ static const help_item static_help_list[] = { "symlist", "\n" - " symlist []\n" + " symlist []\n" "\n" - "Lists registered symbols. If is not specified, then symbols in the global symbol table are " - "displayed; otherwise, the symbols for 's specific CPU are displayed. Symbols are listed " + "Lists registered symbols. If is not specified, then symbols in the global symbol table are " + "displayed; otherwise, the symbols for 's specific CPU are displayed. Symbols are listed " "alphabetically. Read-only symbols are flagged with an asterisk.\n" "\n" "Examples:\n" @@ -398,36 +405,33 @@ static const help_item static_help_list[] = "\n" "tracelog pc\n" " Outputs PC= where is displayed in the default format.\n" - "\n" - "printf a,b\n" - " Outputs A=, B= on one line.\n" }, { "trackpc", "\n" - " trackpc [,,]\n" + " trackpc [,,]\n" "\n" "The trackpc command displays which program counters have already been visited in all disassembler " "windows. The first boolean argument toggles the process on and off. The second argument is a " - "cpu selector; if no cpu is specified, the current cpu is automatically selected. The third argument " + "CPU selector; if no CPU is specified, the current CPU is automatically selected. The third argument " "is a boolean denoting if the existing data should be cleared or not.\n" "\n" "Examples:\n" "\n" "trackpc 1\n" - " Begin tracking the current cpu's pc.\n" + " Begin tracking the current CPU's pc.\n" "\n" "trackpc 1, 0, 1\n" - " Continue tracking pc on cpu 0, but clear existing track info.\n" + " Continue tracking pc on CPU 0, but clear existing track info.\n" }, { "trackmem", "\n" - " trackmem [,,]\n" + " trackmem [,,]\n" "\n" "The trackmem command logs the PC at each time a memory address is written to. " - "The first boolean argument toggles the process on and off. The second argument is a cpu " - "selector; if no cpu is specified, the current cpu is automatically selected. The third argument " + "The first boolean argument toggles the process on and off. The second argument is a CPU " + "selector; if no CPU is specified, the current CPU is automatically selected. The third argument " " is a boolean denoting if the existing data should be cleared or not. Please refer to the " "pcatmem command for information on how to retrieve this data. Also, right clicking in " "a memory window will display the logged PC for the given address.\n" @@ -438,16 +442,16 @@ static const help_item static_help_list[] = " Begin tracking the current CPU's pc.\n" "\n" "trackmem 1, 0, 1\n" - " Continue tracking memory writes on cpu 0, but clear existing track info.\n" + " Continue tracking memory writes on CPU 0, but clear existing track info.\n" }, { "pcatmem", "\n" - " pcatmem(p/d/i)
[,]\n" + " pcatmem(p/d/i)
[,]\n" "\n" "The pcatmem command returns which PC wrote to a given memory address for the current CPU. " - "The first argument is the requested address. The second argument is a cpu selector; if no " - "cpu is specified, the current cpu is automatically selected. Right clicking in a memory window " + "The first argument is the requested address. The second argument is a CPU selector; if no " + "CPU is specified, the current CPU is automatically selected. Right clicking in a memory window " "will also display the logged PC for the given address.\n" "\n" "Examples:\n" @@ -541,14 +545,14 @@ static const help_item static_help_list[] = { "dasm", "\n" - " dasm ,
,[,[,]]\n" + " dasm ,
,[,[,]]\n" "\n" "The dasm command disassembles program memory to the file specified in the parameter. " "
indicates the address of the start of disassembly, and indicates how much " "memory to disassemble. The range
through
+-1 inclusive will be " "output to the file. By default, the raw opcode data is output with each line. The optional " " parameter can be used to enable (1) or disable(0) this feature. Finally, you can " - "disassemble code from another CPU by specifying the parameter.\n" + "disassemble code from another CPU by specifying the parameter.\n" "\n" "Examples:\n" "\n" @@ -595,7 +599,7 @@ static const help_item static_help_list[] = { "dump", "\n" - " dump[{d|i}] ,
,[,[,[,]]]\n" + " dump[{d|i}] ,
,[,[,[,]]]\n" "\n" "The dump/dumpd/dumpi commands dump memory to the text file specified in the " "parameter. 'dump' will dump program space memory, while 'dumpd' will dump data space memory " @@ -606,7 +610,7 @@ static const help_item static_help_list[] = " parameter, which can be used to group the data in 1, 2, 4 or 8-byte chunks. The optional " " parameter can be used to enable (1) or disable (0) the output of ASCII characters to the " "right of each line; by default, this is enabled. Finally, you can dump memory from another CPU " - "by specifying the parameter.\n" + "by specifying the parameter.\n" "\n" "Examples:\n" "\n" @@ -621,14 +625,14 @@ static const help_item static_help_list[] = { "save", "\n" - " save[{d|i}] ,
,[,]\n" + " save[{d|i}] ,
,[,]\n" "\n" "The save/saved/savei commands save raw memory to the binary file specified in the " "parameter. 'save' will save program space memory, while 'saved' will save data space memory " "and 'savei' will save I/O space memory.
indicates the address of the start of saving, " "and indicates how much memory to save. The range
through
+-1 " "inclusive will be output to the file. You can also save memory from another CPU by specifying the " - " parameter.\n" + " parameter.\n" "\n" "Examples:\n" "\n" @@ -641,7 +645,7 @@ static const help_item static_help_list[] = { "load", "\n" - " load[{d|i}] ,
[,,]\n" + " load[{d|i}] ,
[,,]\n" "\n" "The load/loadd/loadi commands load raw memory from the binary file specified in the " "parameter. 'load' will load program space memory, while 'loadd' will load data space memory " @@ -649,7 +653,7 @@ static const help_item static_help_list[] = "and indicates how much memory to load. The range
through
+-1 " "inclusive will be read in from the file. If you specify = 0 or a length greater than the " "total length of the file it will load the entire contents of the file and no more. You can also load " - "memory from another CPU by specifying the parameter.\n" + "memory from another CPU by specifying the parameter.\n" "NOTE: This will only actually write memory that is possible to overwrite in the Memory Window\n" "\n" "Examples:\n" @@ -796,9 +800,9 @@ static const help_item static_help_list[] = { "focus", "\n" - " focus \n" + " focus \n" "\n" - "Sets the debugger focus exclusively to the given . This is equivalent to specifying " + "Sets the debugger focus exclusively to the given . This is equivalent to specifying " "'ignore' on all other CPUs.\n" "\n" "Examples:\n" @@ -809,11 +813,11 @@ static const help_item static_help_list[] = { "ignore", "\n" - " ignore [[,[,...]]]\n" + " ignore [[,[,...]]]\n" "\n" - "Ignores the specified in the debugger. This means that you won't ever see execution " + "Ignores the specified in the debugger. This means that you won't ever see execution " "on that CPU, nor will you be able to set breakpoints on that CPU. To undo this change use " - "the 'observe' command. You can specify multiple s in a single command. Note also that " + "the 'observe' command. You can specify multiple s in a single command. Note also that " "you are not permitted to ignore all CPUs; at least one must be active at all times.\n" "\n" "Examples:\n" @@ -830,10 +834,10 @@ static const help_item static_help_list[] = { "observe", "\n" - " observe [[,[,...]]]\n" + " observe [[,[,...]]]\n" "\n" - "Re-enables interaction with the specified in the debugger. This command undoes the " - "effects of the 'ignore' command. You can specify multiple s in a single command.\n" + "Re-enables interaction with the specified in the debugger. This command undoes the " + "effects of the 'ignore' command. You can specify multiple s in a single command.\n" "\n" "Examples:\n" "\n" @@ -849,9 +853,9 @@ static const help_item static_help_list[] = { "trace", "\n" - " trace {|OFF}[,[,[noloop|logerror][,]]]\n" + " trace {|OFF}[,[,[noloop|logerror][,]]]\n" "\n" - "Starts or stops tracing of the execution of the specified . If is omitted, " + "Starts or stops tracing of the execution of the specified . If is omitted, " "the currently active CPU is specified. When enabling tracing, specify the filename in the " " parameter. To disable tracing, substitute the keyword 'off' for . " " should be either true or false. If 'noloop' is omitted, the trace " @@ -894,15 +898,15 @@ static const help_item static_help_list[] = { "traceover", "\n" - " traceover {|OFF}[,[,[,]]]\n" + " traceover {|OFF}[,[,[,]]]\n" "\n" - "Starts or stops tracing of the execution of the specified . When tracing reaches " + "Starts or stops tracing of the execution of the specified . When tracing reaches " "a subroutine or call, tracing will skip over the subroutine. The same algorithm is used as is " "used in the step over command. This means that traceover will not work properly when calls " "are recusive or the return address is not immediately following the call instruction. If " " should be either true or false. If is true or omitted, the trace " "will have loops detected and condensed to a single line. If it is false, the trace will contain " - "every opcode as it is executed. If is omitted, the currently active CPU is specified. When " + "every opcode as it is executed. If is omitted, the currently active CPU is specified. When " "enabling tracing, specify the filename in the parameter. To disable tracing, substitute " "the keyword 'off' for . If you wish to log additional information on each trace, you can " "append an parameter which is a command that is executed before each trace is logged. " @@ -1133,10 +1137,10 @@ static const help_item static_help_list[] = { "hotspot", "\n" - " hotspot [,[[,]]]\n" + " hotspot [,[[,]]]\n" "\n" "The hotspot command attempts to help locate hotspots in the code where speedup opportunities " - "might be present. , which defaults to the currently active CPU, specified which " + "might be present. , which defaults to the currently active CPU, specified which " "processor's memory to track. , which defaults to 64, controls the depth of the search " "buffer. The search buffer tracks the last memory reads from unique PCs. The " "parameter, which defaults to 250, specifies the minimum number of hits to report.\n" @@ -1349,10 +1353,10 @@ static const help_item static_help_list[] = { "cheatinit", "\n" - " cheatinit [,[
,[,]]]\n" + " cheatinit [,[
,[,]]]\n" "\n" "The cheatinit command initializes the cheat search to the selected memory area.\n" - "If no parameter is specified the cheat search is initialized to all changeable memory of the main cpu.\n" + "If no parameter is specified the cheat search is initialized to all changeable memory of the main CPU.\n" " can be s(signed) or u(unsigned)\n" " can be b(8 bit), w(16 bit), d(32 bit) or q(64 bit)\n" " append s for swapped search\n" @@ -1524,7 +1528,7 @@ static const help_item static_help_list[] = "Examples:\n" "\n" "mount cart,aladdin\n" - " Mounts softlist item alladin on cart device.\n" + " Mounts softlist item aladdin on cart device.\n" }, { "unmount", -- cgit v1.2.3