summaryrefslogtreecommitdiffstats
path: root/src/emu/debug/debugcmd.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use std::forward_list for breakpoint and registerpoint lists (nw) AJR2019-09-101-12/+12
|
* fix MT 7382, 32bit overflow in some debug commands (nw) hap2019-07-301-7/+7
|
* Fix calculation of TMS34010/020 shifted memory addresses for debug save and ↵ AJR2019-07-041-2/+2
| | | | load commands
* (nw) Clean up the mess on master Vas Crabb2019-03-261-13/+14
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-14/+13
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* distate: Expose state_find_entry (nw) AJR2019-03-161-1/+1
|
* Exclude non-CPUs from numerical indexing for debugger commands AJR2019-03-131-5/+10
|
* Eliminate qsort usage in debugger (nw) AJR2019-02-161-8/+4
|
* debugger: add %c to logerror Sven Schnelle2018-11-171-0/+12
| | | | | | | | | | | | | This is useful for catching putchar() like functions and printing the written value to error.log. On hp9k_3xx, i'm using this with the HP 300 test software, to log test error messages that get printed on screen to error.log, so i have the message directly after the debug messages from my driver. Example: wpset 0xfffe36be,80,w,1,{ logerror "%c", wpdata; g }
* debugger: add 'gp' command Sven Schnelle2018-11-061-0/+14
| | | | | | | | | | | | | | gp 'go privilege' starts execution until the privilege mode changes. This can be used to break on task switches. I.e on m68k, one could do: gp { ~sr & 0x2000 && crp_aptr == 0x1234567 } which would execute until the privilege mode changes to user mode and the CPU root pointer is 0x1234567. for cpu code, all that is needed to make this work is calling debugger_privilege_hook() when the execution level changes.
* debugcpu.cpp: Move scripting functions down into console (nw) AJR2018-07-261-2/+2
|
* (nw) srcclean and some cleanup: Vas Crabb2018-07-221-1/+1
| | | | | | * Make more #include guards follow standard format - using MAME_ as the prefix makes it easy to see which ones come from our code in a preprocessor dump, and having both src/devices/machine/foo.h and src/mame/machine/foo.h causes issues anyway * Get #include "emu.h" out of headers - it should only be the first thing in a complilation unit or we get differences in behaviour with PCH on/off * Add out-of-line destructors to some devices - it forces the compiler to instantiate the vtable in a certain location and avoids some non-deterministic compiler behaviours
* emumem: Backend modernization [O. Galibert] Olivier Galibert2018-06-291-14/+34
|
* debugger: make save/load support virtual memory (nw) (#3683) Patrick Mackinlay2018-06-231-18/+33
| | | This makes these commands useful and consistent with dump in a virtual memory environment. One minor issue is what to do with save for an unmapped memory address: the approach taken here is to write the space.unmap() value, which seems the least harmful. On load, unmapped addresses are not written to, meaning that save/load with a constant address map work as expected.
* debugger: add command for go_exception (#3682) Patrick Mackinlay2018-06-231-0/+17
|
* Kludge some absolute tag lookups in the core that can't really be helped (nw) AJR2018-05-211-1/+1
|
* Make debugger dump command work with unaligned addresses AJR2018-05-141-6/+6
|
* srcclean (nw) Vas Crabb2018-04-221-88/+88
|
* remove safe_pc() and safe_pcbase() (nw) smf-2018-04-131-1/+1
|
* Added suspend and resume debugger commands (#3411) GavinAndrews2018-04-021-0/+105
|
* Better fix for find command (nw) AJR2018-03-121-2/+2
|
* Fix debugger find command for address-shifted spaces AJR2018-03-121-4/+4
|
* Fix output of wplist debug command for address-shifted spaces AJR2018-03-111-2/+2
|
* Grammar police (nw) Olivier Galibert2018-02-241-2/+2
|
* Fix ASCII dump output for big-endian spaces AJR2018-02-071-1/+1
|
* remove stutter in dump command ascii bytes (nw) smf-2017-12-261-1/+1
|
* srcclean and manual cleanups (nw) Vas Crabb2017-12-241-1/+1
| | | | | please people, remember to keep source UTF-8 and if you're committing on behalf of others, clean up indents to meet MAME conventions anyone can run srcclean over a submission and see what will get hit
* rewind implementation fixes and improvements vadosnaprimer2017-12-221-15/+10
| | | | | | | | | | | | | - reset scheduler savestate to what it was for years before rewind -- changing saved variables should be done after thorough testing. right now, adding some vars breaks some machines, adding other vars breaks others - switch to megabyte-wise capacity -- savestate size greatly differs between machines, relying on state count is unstable - switch to internal indexing -- no longer depends on inaccurate machine time - rewind accelerator key in debugger (Ctrl+F11) - report capacity hit (once), with some useful info - make error reports saner - mention rewind and rewind_capacity in the docs
* Revert "Command to print all debugger help to html file" Vas Crabb2017-12-151-14/+0
|
* Eliminate remaining uses of address_space::machine() outside of emumem (nw) AJR2017-12-141-2/+2
|
* add command to print all debugger help to html file vadosnaprimer2017-12-111-0/+14
| | | | tweak static_help_list spacing to always pad commands and never pad explanations
* don't lie (nw) smf-2017-12-071-0/+6
|
* Rewind feature and RAM savestates. vadosnaprimer2017-12-061-1/+22
| | | | | | | | | | | | | | This starts the work requested in #2398. How RAM states work. Implemented using util::vectorstream. Instead of dumping m_save.m_entry_list to file, it writes them as binary to vectorstream. Compression is not used, as it would slow down the process. The header is written as usual, also in binary. When a state is loaded, the savestate data gets binary-read from vectorstream. How rewind works. Rewind is optional, it can be turned off through MAME GUI while not running. Rewind capacity is available there too. Rewind step hotkey is available from the standard hotkey menu. In the debugger you have the "rewind" command ("rw" shortcut) that works the same as the hotkey. Every time you advance a frame (pause step), rewinder captures a RAM savestate of the frame you were at. It does the same when you do step into/over/out in the debugger. Every time it captures a new state (and when you unpause), it marks as invalid all its states that go after the current machine time, because input might change, so they are not relevant anymore. It keeps their buffers allocated though, for future use. When rewinder runs out of allowed amount of savestates it can have, it invalidates the first state in the list and tosses its unique_ptr to the end of the list, then it uses its buffer to capture a new state. When you hit the rewind step key, or use "rewind" command in the debugger, it loads a state that is immediately before the current machine time. Invalid states between valid ones are not allowed to appear, as that breaks rewinder integrity and causes problems. Rewinder keeps its own set of ram states as a vector of unique_ptr's. All rewinder operations and errors get reported using machine().popmessage().
* (nw) debugcmd : exiting isn't an error Robbbert2017-12-011-1/+1
|
* (nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get Vas Crabb2017-12-011-12/+13
| | | | | rid of reference constants in the debugger in favour of capturing the value in the bind/lambda (less ugly casting)
* Pet peeving with extreme prejudice (nw) Olivier Galibert2017-11-301-8/+8
|
* Fix save Olivier Galibert2017-11-291-1/+2
|
* emumem: API change [O. Galibert] Olivier Galibert2017-11-291-32/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * direct_read_data is now a template which takes the address bus shift as a parameter. * address_space::direct<shift>() is now a template method that takes the shift as a parameter and returns a pointer instead of a reference * the address to give to {read|write}_* on address_space or direct_read_data is now the address one wants to access Longer explanation: Up until now, the {read|write}_* methods required the caller to give the byte offset instead of the actual address. That's the same on byte-addressing CPUs, e.g. the ones everyone knows, but it's different on the word/long/quad addressing ones (tms, sharc, etc...) or the bit-addressing one (tms340x0). Changing that required templatizing the direct access interface on the bus addressing granularity, historically called address bus shift. Also, since everybody was taking the address of the reference returned by direct(), and structurally didn't have much choice in the matter, it got changed to return a pointer directly. Longest historical explanation: In a cpu core, the hottest memory access, by far, is the opcode fetching. It's also an access with very good locality (doesn't move much, tends to stay in the same rom/ram zone even when jumping around, tends not to hit handlers), which makes efficient caching worthwhile (as in, 30-50% faster core iirc on something like the 6502, but that was 20 years ago and a number of things changed since then). In fact, opcode fetching was, in the distant past, just an array lookup indexed by pc on an offset pointer, which was updated on branches. It didn't stay that way because more elaborate access is often needed (handlers, banking with instructions crossing a bank...) but it still ends up with a frontend of "if the address is still in the current range read from pointer+address otherwise do the slowpath", e.g. two usually correctly predicted branches plus the read most of the time. Then the >8 bits cpus arrived. That was ok, it just required to do the add to a u8 *, then convert to a u16/u32 * and do the read. At the asm level, it was all identical except for the final read, and read_byte/word/long being separate there was no test (and associated overhead) added in the path. Then the word-addressing CPUs arrived with, iirc, the tms cpus used in atari games. They require, to read from the pointer, to shift the address, either explicitely, or implicitely through indexing a u16 *. There were three possibilities: 1- create a new read_* method for each size and granularity. That amounts to a lot of copy/paste in the end, and functions with identical prototypes so the compiler can't detect you're using the wrong one. 2- put a variable shift in the read path. That was too expensive especially since the most critical cpus are byte-addressing (68000 at the time was the key). Having bit-adressing cpus which means the shift can either be right or left depending on the variable makes things even worse. 3- require the caller to do the shift himself when needed. The last solution was chosen, and starting that day the address was a byte offset and not the real address. Which is, actually, quite surprising when writing a new cpu core or, worse, when using the read/write methods from the driver code. But since then, C++ happened. And, in particular, templates with non-type parameters. Suddendly, solution 1 can be done without the copy/paste and with different types allowing to detect (at runtime, but systematically and at startup) if you got it wrong, while still generating optimal code. So it was time to switch to that solution and makes the address parameter sane again. Especially since it makes mucking in the rest of the memory subsystem code a lot more understandable.
* dvdisasm: Overhaul [O. Galibert] Olivier Galibert2017-11-261-110/+62
| | | | | | | | Disassemblers are now independant classes. Not only the code is cleaner, but unidasm has access to all the cpu cores again. The interface to the disassembly method has changed from byte buffers to objects that give a result to read methods. This also adds support for lfsr and/or paged PCs.
* debugcmd.cpp: Give this error message a newline (nw) AJR2017-08-081-1/+1
|
* This is too contentious, please put it up for review Vas Crabb2017-08-011-33/+34
| | | | | | Revert "Changes to debugger memory address translation" This reverts commit bb0964f9a284b15851773f5428bd602ca01cc28b.
* Changes to debugger memory address translation AJR2017-08-011-34/+33
| | | | | | - memory_translate now returns an address space number rather a boolean flag, permitting addresses in part of one space to map to an entirely different space. This is primarily intended to help MCUs which have blocks of internal memory that can be dynamically remapped, but may also allow for more accurate emulation of MMUs that drive multiple external address spaces, since the old limit of four address spaces per MAME device has been lifted. - memory_translate has also been made a const method, in spite of a couple of badly behaved CPU cores that can't honestly treat it as one. - The (read|write)_(byte|word|dword|qword|memory|opcode) accessors have been transferred from debugger_cpu to device_memory_interface, with somewhat modified arguments corresponding to the translate function it calls through to if requested.
* kill a trampoline (nw) Vas Crabb2017-07-131-1/+3
|
* Merge branch 'master' into debugger_load Nathan Woods2017-07-041-16/+16
|\
| * dimemory: Lift the cap on the number of address spaces per device [O. Galibert] Olivier Galibert2017-07-031-2/+2
| |
| * Rename AS_DECRYPTED_OPCODES to AS_OPCODES [O. Galibert] Olivier Galibert2017-07-031-14/+14
| |
* | Made the debugger 'load' length field be optional, C++-ification Nathan Woods2017-06-251-26/+34
|/
* Changed 'enum read_or_write' to be 'enum class' Nathan Woods2017-06-191-1/+1
|
* Fixed a crash in the 'symlist' debugger command (MT#6575) Nathan Woods2017-05-031-2/+1
|
* Make debugger 'dasm' command able to traverse virtual spaces with Happy2017-03-191-18/+25
| | | | | | | | unmapped holes. Previously, 'dasm' would enter an infinite loop if it hit an unmapped pc, continuing to grow the output file until the program was killed.