diff options
Diffstat (limited to 'src/emu/debug/debughlp.cpp')
-rw-r--r-- | src/emu/debug/debughlp.cpp | 154 |
1 files changed, 79 insertions, 75 deletions
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 [<topic>] -- get help on a particular topic\n" " do <expression> -- evaluates the given expression\n" - " symlist [<cpu>] -- lists registered symbols\n" + " symlist [<CPU>] -- lists registered symbols\n" " softreset -- executes a soft reset\n" " hardreset -- executes a hard reset\n" " print <item>[,...] -- prints one or more <item>s to the console\n" @@ -87,12 +87,12 @@ static const help_item static_help_list[] = " logerror <format>[,<item>[,...]] -- outputs one or more <item>s to the error.log\n" " tracelog <format>[,<item>[,...]] -- outputs one or more <item>s to the trace file using <format>\n" " tracesym <item>[,...]] -- outputs one or more <item>s to the trace file\n" - " history [<cpu>,<length>] -- outputs a brief history of visited opcodes\n" - " trackpc [<bool>,<cpu>,<bool>] -- visually track visited opcodes [boolean to turn on and off, for the given cpu, clear]\n" + " history [<CPU>,<length>] -- outputs a brief history of visited opcodes\n" + " trackpc [<bool>,<CPU>,<bool>] -- visually track visited opcodes [boolean to turn on and off, for the given CPU, clear]\n" " trackmem [<bool>,<bool>] -- record which PC writes to each memory address [boolean to turn on and off, clear]\n" - " pcatmemp <address>[,<cpu>] -- query which PC wrote to a given program memory address for the current CPU\n" - " pcatmemd <address>[,<cpu>] -- query which PC wrote to a given data memory address for the current CPU\n" - " pcatmemi <address>[,<cpu>] -- query which PC wrote to a given I/O memory address for the current CPU\n" + " pcatmemp <address>[,<CPU>] -- query which PC wrote to a given program memory address for the current CPU\n" + " pcatmemd <address>[,<CPU>] -- query which PC wrote to a given data memory address for the current CPU\n" + " pcatmemi <address>[,<CPU>] -- 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] <filename> -- 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 <command> for further details on each command\n" "\n" - " dasm <filename>,<address>,<length>[,<opcodes>[,<cpu>]] -- disassemble to the given file\n" + " dasm <filename>,<address>,<length>[,<opcodes>[,<CPU>]] -- disassemble to the given file\n" " f[ind] <address>,<length>[,<data>[,...]] -- search program memory for data\n" " f[ind]d <address>,<length>[,<data>[,...]] -- search data memory for data\n" " f[ind]i <address>,<length>[,<data>[,...]] -- search I/O memory for data\n" - " dump <filename>,<address>,<length>[,<size>[,<ascii>[,<cpu>]]] -- dump program memory as text\n" - " dumpd <filename>,<address>,<length>[,<size>[,<ascii>[,<cpu>]]] -- dump data memory as text\n" - " dumpi <filename>,<address>,<length>[,<size>[,<ascii>[,<cpu>]]] -- dump I/O memory as text\n" - " save <filename>,<address>,<length>[,<cpu>] -- save binary program memory to the given file\n" - " saved <filename>,<address>,<length>[,<cpu>] -- save binary data memory to the given file\n" - " savei <filename>,<address>,<length>[,<cpu>] -- save binary I/O memory to the given file\n" - " load <filename>,<address>[,<length>,<cpu>] -- load binary program memory from the given file\n" - " loadd <filename>,<address>[,<length>,<cpu>] -- load binary data memory from the given file\n" - " loadi <filename>,<address>[,<length>,<cpu>] -- load binary I/O memory from the given file\n" + " dump <filename>,<address>,<length>[,<size>[,<ascii>[,<CPU>]]] -- dump program memory as text\n" + " dumpd <filename>,<address>,<length>[,<size>[,<ascii>[,<CPU>]]] -- dump data memory as text\n" + " dumpi <filename>,<address>,<length>[,<size>[,<ascii>[,<CPU>]]] -- dump I/O memory as text\n" + " save <filename>,<address>,<length>[,<CPU>] -- save binary program memory to the given file\n" + " saved <filename>,<address>,<length>[,<CPU>] -- save binary data memory to the given file\n" + " savei <filename>,<address>,<length>[,<CPU>] -- save binary I/O memory to the given file\n" + " load <filename>,<address>[,<length>,<CPU>] -- load binary program memory from the given file\n" + " loadd <filename>,<address>[,<length>,<CPU>] -- load binary data memory from the given file\n" + " loadi <filename>,<address>[,<length>,<CPU>] -- load binary I/O memory from the given file\n" " map <address> -- map logical program address to physical address and bank\n" " mapd <address> -- map logical data address to physical address and bank\n" " mapi <address> -- map logical I/O address to physical address and bank\n" @@ -139,11 +139,11 @@ static const help_item static_help_list[] = " gt[ime] <milliseconds> -- 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 <cpu> -- focuses debugger only on <cpu>\n" - " ignore [<cpu>[,<cpu>[,...]]] -- stops debugging on <cpu>\n" - " observe [<cpu>[,<cpu>[,...]]] -- resumes debugging on <cpu>\n" - " trace {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]] -- trace the given CPU to a file (defaults to active CPU)\n" - " traceover {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n" + " focus <CPU> -- focuses debugger only on <CPU>\n" + " ignore [<CPU>[,<CPU>[,...]]] -- stops debugging on <CPU>\n" + " observe [<CPU>[,<CPU>[,...]]] -- resumes debugging on <CPU>\n" + " trace {<filename>|OFF}[,<CPU>[,<detectloops>[,<action>]]] -- trace the given CPU to a file (defaults to active CPU)\n" + " traceover {<filename>|OFF}[,<CPU>[,<detectloops>[,<action>]]] -- 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 [<wpnum>] -- disables a given watchpoint or all if no <wpnum> specified\n" " wpenable [<wpnum>] -- enables a given watchpoint or all if no <wpnum> specified\n" " wplist -- lists all the watchpoints\n" - " hotspot [<cpu>,[<depth>[,<hits>]]] -- attempt to find hotspots\n" + " hotspot [<CPU>,[<depth>[,<hits>]]] -- 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@<addr> refers to the byte read from <addr>. 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@<addr> refers to the byte at <addr> 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 <command> for further details on each command\n" "\n" - " cheatinit [<address>,<length>[,<cpu>]] -- initialize the cheat search to the selected memory area\n" + " cheatinit [<address>,<length>[,<CPU>]] -- initialize the cheat search to the selected memory area\n" " cheatrange <address>,<length> -- add to the cheat search the selected memory area\n" " cheatnext <condition>[,<comparisonvalue>] -- continue cheat search comparing with the last value\n" " cheatnextf <condition>[,<comparisonvalue>] -- continue cheat search comparing with the first value\n" @@ -271,10 +278,10 @@ static const help_item static_help_list[] = { "symlist", "\n" - " symlist [<cpu>]\n" + " symlist [<CPU>]\n" "\n" - "Lists registered symbols. If <cpu> is not specified, then symbols in the global symbol table are " - "displayed; otherwise, the symbols for <cpu>'s specific CPU are displayed. Symbols are listed " + "Lists registered symbols. If <CPU> is not specified, then symbols in the global symbol table are " + "displayed; otherwise, the symbols for <CPU>'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=<pcval> where <pcval> is displayed in the default format.\n" - "\n" - "printf a,b\n" - " Outputs A=<aval>, B=<bval> on one line.\n" }, { "trackpc", "\n" - " trackpc [<bool>,<cpu>,<bool>]\n" + " trackpc [<bool>,<CPU>,<bool>]\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 [<bool>,<cpu>,<bool>]\n" + " trackmem [<bool>,<CPU>,<bool>]\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) <address>[,<cpu>]\n" + " pcatmem(p/d/i) <address>[,<CPU>]\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 <filename>,<address>,<length>[,<opcodes>[,<cpu>]]\n" + " dasm <filename>,<address>,<length>[,<opcodes>[,<CPU>]]\n" "\n" "The dasm command disassembles program memory to the file specified in the <filename> parameter. " "<address> indicates the address of the start of disassembly, and <length> indicates how much " "memory to disassemble. The range <address> through <address>+<length>-1 inclusive will be " "output to the file. By default, the raw opcode data is output with each line. The optional " "<opcodes> parameter can be used to enable (1) or disable(0) this feature. Finally, you can " - "disassemble code from another CPU by specifying the <cpu> parameter.\n" + "disassemble code from another CPU by specifying the <CPU> parameter.\n" "\n" "Examples:\n" "\n" @@ -595,7 +599,7 @@ static const help_item static_help_list[] = { "dump", "\n" - " dump[{d|i}] <filename>,<address>,<length>[,<size>[,<ascii>[,<cpu>]]]\n" + " dump[{d|i}] <filename>,<address>,<length>[,<size>[,<ascii>[,<CPU>]]]\n" "\n" "The dump/dumpd/dumpi commands dump memory to the text file specified in the <filename> " "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[] = "<size> parameter, which can be used to group the data in 1, 2, 4 or 8-byte chunks. The optional " "<ascii> 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 <cpu> parameter.\n" + "by specifying the <CPU> parameter.\n" "\n" "Examples:\n" "\n" @@ -621,14 +625,14 @@ static const help_item static_help_list[] = { "save", "\n" - " save[{d|i}] <filename>,<address>,<length>[,<cpu>]\n" + " save[{d|i}] <filename>,<address>,<length>[,<CPU>]\n" "\n" "The save/saved/savei commands save raw memory to the binary file specified in the <filename> " "parameter. 'save' will save program space memory, while 'saved' will save data space memory " "and 'savei' will save I/O space memory. <address> indicates the address of the start of saving, " "and <length> indicates how much memory to save. The range <address> through <address>+<length>-1 " "inclusive will be output to the file. You can also save memory from another CPU by specifying the " - "<cpu> parameter.\n" + "<CPU> parameter.\n" "\n" "Examples:\n" "\n" @@ -641,7 +645,7 @@ static const help_item static_help_list[] = { "load", "\n" - " load[{d|i}] <filename>,<address>[,<length>,<cpu>]\n" + " load[{d|i}] <filename>,<address>[,<length>,<CPU>]\n" "\n" "The load/loadd/loadi commands load raw memory from the binary file specified in the <filename> " "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 <length> indicates how much memory to load. The range <address> through <address>+<length>-1 " "inclusive will be read in from the file. If you specify <length> = 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 <cpu> parameter.\n" + "memory from another CPU by specifying the <CPU> 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 <cpu>\n" + " focus <CPU>\n" "\n" - "Sets the debugger focus exclusively to the given <cpu>. This is equivalent to specifying " + "Sets the debugger focus exclusively to the given <CPU>. 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 [<cpu>[,<cpu>[,...]]]\n" + " ignore [<CPU>[,<CPU>[,...]]]\n" "\n" - "Ignores the specified <cpu> in the debugger. This means that you won't ever see execution " + "Ignores the specified <CPU> 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 <cpu>s in a single command. Note also that " + "the 'observe' command. You can specify multiple <CPU>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 [<cpu>[,<cpu>[,...]]]\n" + " observe [<CPU>[,<CPU>[,...]]]\n" "\n" - "Re-enables interaction with the specified <cpu> in the debugger. This command undoes the " - "effects of the 'ignore' command. You can specify multiple <cpu>s in a single command.\n" + "Re-enables interaction with the specified <CPU> in the debugger. This command undoes the " + "effects of the 'ignore' command. You can specify multiple <CPU>s in a single command.\n" "\n" "Examples:\n" "\n" @@ -849,9 +853,9 @@ static const help_item static_help_list[] = { "trace", "\n" - " trace {<filename>|OFF}[,<cpu>[,[noloop|logerror][,<action>]]]\n" + " trace {<filename>|OFF}[,<CPU>[,[noloop|logerror][,<action>]]]\n" "\n" - "Starts or stops tracing of the execution of the specified <cpu>. If <cpu> is omitted, " + "Starts or stops tracing of the execution of the specified <CPU>. If <CPU> is omitted, " "the currently active CPU is specified. When enabling tracing, specify the filename in the " "<filename> parameter. To disable tracing, substitute the keyword 'off' for <filename>. " "<detectloops> 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 {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]]\n" + " traceover {<filename>|OFF}[,<CPU>[,<detectloops>[,<action>]]]\n" "\n" - "Starts or stops tracing of the execution of the specified <cpu>. When tracing reaches " + "Starts or stops tracing of the execution of the specified <CPU>. 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 " "<detectloops> should be either true or false. If <detectloops> 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 <cpu> is omitted, the currently active CPU is specified. When " + "every opcode as it is executed. If <CPU> is omitted, the currently active CPU is specified. When " "enabling tracing, specify the filename in the <filename> parameter. To disable tracing, substitute " "the keyword 'off' for <filename>. If you wish to log additional information on each trace, you can " "append an <action> 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 [<cpu>,[<depth>[,<hits>]]]\n" + " hotspot [<CPU>,[<depth>[,<hits>]]]\n" "\n" "The hotspot command attempts to help locate hotspots in the code where speedup opportunities " - "might be present. <cpu>, which defaults to the currently active CPU, specified which " + "might be present. <CPU>, which defaults to the currently active CPU, specified which " "processor's memory to track. <depth>, which defaults to 64, controls the depth of the search " "buffer. The search buffer tracks the last <depth> memory reads from unique PCs. The <hits> " "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 [<sign><width><swap>,[<address>,<length>[,<cpu>]]]\n" + " cheatinit [<sign><width><swap>,[<address>,<length>[,<CPU>]]]\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" "<sign> can be s(signed) or u(unsigned)\n" "<width> can be b(8 bit), w(16 bit), d(32 bit) or q(64 bit)\n" "<swap> 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", |