summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug
Commit message (Collapse)AuthorAgeFilesLines
* Better handling of null/missing items. More consistent error handling. ↵save-experiments Aaron Giles2021-04-201-0/+10
| | | | Reduced compression to default to speed up saves. Optimized simple binary saves as well. Device interfaces now have automatic containers. Fixed duplicate entry detection. Added logic to parse an item we're skipping. Added detection of missing/duplicate items from input JSON. Fixed timing for save/load.
* Differentiated raw arrays from vector arrays. Add warnings for raw arrays ↵ Aaron Giles2021-04-191-3/+5
| | | | that are not in containers.
* Detect array members that can't be replicated and manually register each ↵ Aaron Giles2021-04-192-36/+44
| | | | item instead. Remove old ALLOW_SAVE_TYPE now that enums are implicitly supported. Add stricter checking of endpoint offsets. Some other cleanups.
* g update: Aaron Giles2021-04-153-9/+7
| | | | | | | | | | | | | | | | | | | * Removed old saving mechanism entirely, including internal lists of items. * Removed old logic saving to streams/buffers/files. * Removed old state item iterator; a new mechanism will need to be created for this. Stubbed out debugger and LUA calls to it for now. * Replaced the streams/buffers saves with the new binary save; these are presumed to be 100% internal, so there is no header checking or other associated logic. * Stubbed in incomplete file handling for JSON-based saves; large arrays are identified and referenced as external, though ZIP writing has not been done yet. * Redid JSON generation using an internal buffer and helpers for speed. * Added sorting and pruning of save items after registration. * Added detection of duplicate entries. * Fixed display of long names in save window. * Moved timers into their own container.
* Added save state window to debugger. Centralized unique/vector/pointer ↵ Aaron Giles2021-04-124-0/+558
| | | | unwrapping.
* Add %o format support to debugger printf command AJR2021-04-061-0/+26
|
* Add 'wpsize' variable to access the data size from a watchpoint (#7837) Scott Percival2021-03-033-3/+6
|
* debug: add cls command to clear console buffer hap2021-02-164-1/+13
|
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-145-8/+8
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Stop converting debugger console commands to all lowercase before parsing ↵ AJR2021-02-133-56/+56
| | | | | | | them. Case insensitivity has been preserved for command names, CPU and region tags and certain symbolic parameters (as well as expressions, which were treated as case-insensitive in other contexts), but filenames and character constants are no longer automatically lowercased. * debugcmd.cpp, debugcon.cpp: Remove some superfluous c_str() calls * debugcmd.cpp: Remove local member referencing debugger_cpu, which is accessed only rarely since the console now tracks the visible CPU
* Update state views when memory is modified through the debugger (since ↵ AJR2021-02-091-0/+1
| | | | registers can be memory-mapped)
* Bug fixes and usablility enhancements: Vas Crabb2021-01-291-0/+2
| | | | | | * Declare intent when requesting virtual memory (for NetBSD, 7712) * Improve scrolling behaviour in Qt debugger (MT07795) * Added prompts to input mapping menu to make it less intimidating
* debug/express.cpp: Fix parsing for preincrement & predecrement operators; ↵ AJR2021-01-242-90/+72
| | | | make debugging function print_tokens usable again
* Much more core std::string_view modernization AJR2021-01-205-7/+10
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* natkeyboard: Remove from ioport_manager AJR2020-12-261-2/+2
|
* debughlp.cpp: document loadr and saver debugger commands Ivan Vangelista2020-12-151-1/+34
|
* Prevent certain register values from being formatted with invalid characters ↵ AJR2020-12-141-0/+3
| | | | added in debugger state views (e.g. upd7810)
* debugcon.cpp, textbuf.cpp: More uses for std::string_view AJR2020-12-114-71/+67
|
* debug/textbuf.cpp: Another obvious use for std::string_view AJR2020-12-083-11/+6
|
* frontend: Lua engine improvements. Vas Crabb2020-11-302-2/+3
| | | | | | | | | | | | | | Added methods for enabling and disabling breakpoints and watchpoints, and made debugger views update when breakpoints/watchpoints are manipulated from Lua. Made breakpoints and watchpoints objects rather than tables. (It’s not possible to enable/disable a breakpoint or watchpoint from the object itself, you have to go through its owners' debug interface.) Exposed more device_t members for dealing with child/sibling tags and devices. Also provided a way to get regions/shares/banks from a device using relative tags rather than going through the memory manager with absolute tags.
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-258-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register.
* Implement views, which are essentially bankdevs integrated into the Olivier Galibert2020-11-221-3/+8
| | | | memory map system. [O. Galibert]
* Add strdump debugger command for dumping memory as ASCII strings AJR2020-11-183-0/+203
|
* Fix most implicit fallthrough warnings from clang Vas Crabb2020-11-171-1/+1
|
* Remove some deprecated instantiations of static constexpr members (MSVC ↵ Vas Crabb2020-11-152-10/+0
| | | | complains about them now)
* -Switch to building MAME as C++17. Vas Crabb2020-11-151-16/+16
| | | | | | | * Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
* -emu/render.cpp: Load from all external artwork paths. Vas Crabb2020-10-133-42/+46
| | | | | | -emu/rendlay.cpp: Made real component drawing code a bit less gross. -emu/debugcon.cpp: Less screaming now that things aren't macros.
* emu/debug: Removed more macros, added more const, make a couple more things ↵ Vas Crabb2020-10-127-242/+220
| | | | use smart pointers.
* Got rid of global_alloc/global_free. Vas Crabb2020-10-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* Add abs, bit, s8, s16, s32 functions to debugger AJR2020-09-252-9/+72
|
* debug/express.h: Remove leftover declaration AJR2020-09-191-2/+0
|
* emu/save.cpp: Fix bad SFINAE trick breaking segapcm.cpp, fix saving attotime ↵ Vas Crabb2020-09-141-1/+1
| | | | array on 32-bit Linux targets that align u64 on 32-bit boundaries
* -util/xmlfile: Escape attribute and element content. Vas Crabb2020-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | The previous behaviour was unintuitive - parsing an XML file and writing it out immediately would produce invalid XML if the file contained any characters that needed escaping. It makes far more sense to escape on writing rather than expecting the user to escape input. -Add preliminary support for visibility toggles to artwork system. This allows the user to show/hide related elements in a view, with nesting. The view can specify whether elements are shown or hidden by default. Settings are saved per host window/screen per view. There is no way to set the initial visibility state on the command line. Legacy "Space Invaders cabinet model" layers are mapped onto visibility toggles. This is not stable yet. In particular, the XML element/attribute names have not been finalised. The new features have not been added to complay.py to prevent them from being used before they're finalised.
* express.cpp: Replace simple_list with std::list in parsing AJR2020-09-032-56/+87
| | | | * Report too few or too many function parameters in debug expressions as expression errors instead of exiting MAME with a fatal error
* device_state_interface overhaul AJR2020-08-312-4/+6
| | | | | | | | | | | - device_state_entry::value and device_state_entry::set_value now do everything except the register lookup, allowing them to be made public. The debugger expression engine now uses these. - device_state_entry::dvalue and device_state_entry::set_dvalue have also been made public, theoretically permitting outside code layers to inspect and modify floating-point registers. - The double specialization of device_pseudo_state_register (now renamed device_functional_state_register) has been added to the core. - state_add now has an additional specialization that takes both a reference and a write function, using the former for reads only. - state_max_length has been eliminated in favor of obtaining the relevant info through device_state_entry::max_length. - The debugger state view no longer adds "flags" as "???" if none have been registered. - set_state_string has been removed. It was never properly implemented, and it is difficult to see how it could have been done in a useful and consistent way. - state_find_entry and its typical callers state_int and set_state_int have been inlined for some hopeful efficiency gains.
* Document rowsize parameter for dump command in debugger help AJR2020-08-081-4/+4
|
* Merge tag 'mame0223' into mainline-master Vas Crabb2020-08-061-25/+23
|\ | | | | | | MAME 0.223
| * -debug/debugcmd.cpp: Don't leak an open FILE when an argument is invalid and ↵ Vas Crabb2020-08-061-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | also fixed a spelling error. * The saver/loadr commands should consider region endianness for portability. -cpu/gigatron: Capitalisation of hex values was inconsistent, change it to lowercase as that tends to be the MAME standard. -machine/exorterm.cpp: Fixed inputs magically changing on reset when they shouldn't (there are still others that should be fixed). -mpu4vid.cpp: Corrected some errors in game descriptions. -Fixed a couple of editing errors.
* | Add 'fill' command to debugger. Syntax and operation are similar to 'find' ↵ AJR2020-08-013-0/+130
|/ | | | command.
* srcclean for 0.223 Vas Crabb2020-07-261-1/+1
|
* Merge tag 'mame0222' into mainline-master Vas Crabb2020-06-262-11/+11
|\ | | | | | | MAME 0.222
| * cleanup and loose ends: Vas Crabb2020-06-262-11/+11
| | | | | | | | | | | | | | * Added AsmJit to COPYING * Changed some added code to better match surrounding code style * Removed completely unused members from mw8080bw.h state class * Made some code better align with MAME standards
* | add saver to operate memory region (#6837) Jacob2020-06-212-0/+115
|/ | | | | * add debugger command saver for memory region * added debugger command loadr for memory region
* srcclean and cleanup (nw) Vas Crabb2020-06-213-49/+49
|
* emu: correct some file headers (nw) hap2020-06-1910-10/+10
|
* Allow debugger dump command to dump with byte granularity from address ↵ AJR2020-06-171-1/+1
| | | | spaces with positive shifts
* Debugger: add `condump` command to export console buffer to a log file (#6781) Stevie-O2020-06-074-1/+149
| | | | | | | | This is another debugger enhancement -- it allows you to export the current contents of the debug console window to a file. The filename parsing is based on the `trace` command, and as such, supports both the "{game}" placeholder, and the ">>" prefix for appending instead of overwriting.
* Eliminate space.device() in watchpoint code (nw) AJR2020-05-311-3/+3
|
* Merge pull request #6660 from Stevie-O/debug-console-logging R. Belmont2020-05-302-4/+43
|\ | | | | Debugger - add `-debuglog` option to log debug console output to file
| * Debugger - add `-debuglog` option to log debug console output to file Stephen Oberholtzer2020-05-072-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this option is specified, all console output is echoed to a log file. Some caveats/limitations: - The file-open process was copied from -log, so it has the same limits - Filename is hard-coded (debug.log) - File is overwritten if it exists - File is opened during emulation initialization - Thus, the file is cleared if you invoke the "Hard Reset" debugger command - Probably some other details I don't know about - Logging works as such: When a string is appended to the scrollback buffer, it is also written to the log file. Some commands forcibly wrap their output (e.g. `help` to 80 columns.) Because this wrapping is done inside the scrollback buffer, the text written to the file is not wrapped. This can be seen with `help execution`.