summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcmd.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fill q.value was not working, you will not guess what the bug was Olivier Galibert2025-10-211-1/+1
|
* emu/debug: Extended memory commands for region and space (#13767) holub2025-08-301-35/+715
|
* -cpu/drcbex86.cpp: Not nuking the destination register on 64-bit rotate is ↵ Vas Crabb2025-08-051-27/+8
| | | | | | | important (fixes MT09228), also slight optimisations. -debug/debugcmd.cpp: Made the code for symlist marginally less dreadful.
* Fix symlist default CPU (#13886) dave-br2025-07-261-2/+2
| | | When executed with no parameters, symlist was displaying the symbol tables for the first CPU and the debugger built-in globals. Defaulting to the first CPU like that didn't make sense. It now displays the symbol tables for the VISIBLE cpu and the debugger built-in globals.
* emu/debug/debugcmd.cpp: Have print command insert spaces between numbers AJR2025-07-251-0/+4
|
* debugcmd: no need to try to convert string_view to const char*, fix possible ↵ hap2025-06-111-25/+28
| | | | nullptr access
* debugger: symlist usability + symbol table extensibility (#13694) dave-br2025-05-201-37/+59
| | | | | | | Address issue #6655 (symlist command usability), add a bit of plumbing for future extensibility. symlist with no arguments displays all global *and* :maincpu symbols, with clear header text for each list. At the bottom, prints helper text to make user aware of the cpu form To allow for adding new kinds of symbols in the future, this adds an enum field to symbol table for its 'type', for prettier printing from symlist. Symlist now traverses symbol table chain completely.
* debugcmd: update prev commit: change out+app to in+out+ate hap2025-04-191-3/+3
|
* debugcmd: correct trace file append hap2025-04-191-1/+1
|
* Cleaned up various stuff. Vas Crabb2024-06-301-5/+7
| | | | | | | | | | * sony_news.xml: Added proper compatibility flags for different generations. * cpu/pic16x8x: This is very much a derivative work. * cpu/tms32025.cpp: Allow stack push/pop to be inlined. * tecmo/bombjack.cpp: Avoid needing to remove and replace devices in machine configuration. * Various other cleanup.
* debug: fix MT#08870, debugger tracesym regression Patrick Mackinlay2024-06-051-1/+2
|
* emu/debug/debugcmd.cpp: Add NUL-terminated string argument support to ↵ Patrick Mackinlay2024-03-211-15/+74
| | | | | | | 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.
* emu/debug/debugcmd.cpp: Added support for lowercase hex to printf/logerror. ↵ Vas Crabb2024-03-191-62/+34
| | | | | | | | | [Patrick Mackinlay] Also simplified implementation by better leveraging util/strformat.h. This is from pull request #12124, to get some testing for the fundamental change before freeze.
* Clean up several sprintf() deprecation warningss in non-3rdparty code. [R. ↵ arbee2023-06-031-1/+1
| | | | Belmont]
* Restored ability of for image devices to report specific error messages. Vas Crabb2023-04-081-4/+12
| | | | | | | | | | | | | | Restores ability to give specific/detailed messages removed in 6f7e4141ea14acaaf9cb973c66788fabb3457023 while pandering to obsession with single return value. Moved responsibility for displaying the error message in the UI to the caller rather than device_image_interface, and made device_image_interface always log the error along with the full path and error condition content. Gave several image devices more detailed error messages. Added some FIXME comments for apparent bugs.
* Improvements to debugger 'map' command AJR2023-04-021-4/+5
| | | | | - Add names of physical and logical spaces now that one space can map to another - Correct usage of address space masks
* API change for device_image_interface AJR2023-03-301-2/+3
| | | | | | | | | - Remove the seterror method for recording error messages and conditions. Condition codes have been made return values for call_load, call_create and various related callbacks. Error messages (which many devices weren't generating) are now displayed through osd_printf_error. - Eliminate the image_init_result and image_verify_result pass/fail enumeration types. Update many functions that were returning these enumerations or simply bools to return std::error_condition instead. In some cases, this type is now passed down from internal parsing/loading functions which were already returning it. In various other cases, the former default UNSPECIFIED has been used as a catchall for I/O errors; anticipated future refactorings should make these error returns more specific. - Expand the image_error categories to include INVALIDLENGTH, NOSOFTWARE and BADSOFTWARE. The first is largely self-explanatory. The second is generated by the core to indicate failure to find software items in lists. The third is provided for devices to indicate semantic errors in software list entries. - Change the return type of floppy_image_device::identify to a pair so the potential error condition can be passed along to the UI without storing it in a member variable. - Move device_image_interface::message down into snapshot_image_device and change its implementation to use string_format instead of printf. - Correct a typo in the shortname of the generic snapshot device.
* Apply workaround for debugger history command consuming ridiculous amounts ↵ AJR2023-03-291-1/+1
| | | | of memory when jumping around large address spaces
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-181-64/+83
| | | | divtlb: Wrap the constants
* Revert "Make numbers signed in debugger where it matters" Vas Crabb2022-11-271-19/+21
| | | | | | | | | | | | | | This reverts commit 922d5b3c81459173ce99970dca0e44825f0a4494. This broke an important use case with MIPS3 address comparisons no longer behaving intutively. It's also another case of a debugger change that wasn't followed through properly, with absolutely no attempt to update the internal debugger help or the documentation for the web site. I realise signed maths woud be a useful feature, for the debugger, but it needs to be done in a way that doesn't break important use cases.
* Make numbers signed in debugger where it matters AJR2022-11-161-21/+19
| | | | | | | - Perform signed calculations for /, %, >>, /=, %=, >>=, <, >, <=, >= operators in debugger expressions - Eliminate workarounds in debugger printf method for system printf not reliably handling 64-bit integers (a previous refactoring adopted strformat for this) - Output signed decimals for %d in debugger printf formats; also add %u format - Add two-argument sext function to debugger
* Move debugger command parameter validation helpers into debugger_console AJR2022-10-291-583/+97
|
* Fix regressions in debugger trace command from ↵ AJR2022-09-021-2/+3
| | | | d8d588262de1f11a529b208e470cff9b89a4cba6, including use-after-move issue
* Debugger changes AJR2022-08-281-54/+215
| | | | | | | - Added exception points as a new class of "points" triggering on specific exception numbers, with a similar set of commands to breakpoints and registerpoints. - Removed the per-instruction callback hook from device_debug. Only one driver was using this (rmnimbus.cpp), and what it was doing with it could be done more cleanly with exception points. - Change the type of the action string parameter for "points"-creating methods and make some parameters optional for those. - Change trace file logging to use a std::ostream instead of FILE * to take better advantage of strformat.
* ui/icorender.cpp: Revert initialisations that can hide real bugs. Vas Crabb2022-08-031-8/+7
| | | | | | | | | | | | | | | | | | MSVC isn't smart enough to detect that these can only be used after being assigned while clang and GCC can work it out fine. Initialising them to zero at declaration has the potential to mask real bugs if some code path tries to use them without assigning them. Code flow analysis (e.g. Coverity) or memory analysers (e.g. valgrind or Purify) won't pick up on the buggy path because the variable will technically be initialised. MSVC is problematic when it comes to warnings about uninitialised variables in general. Unfortunately MSVC has no option to selectively treat warnings as errors, unlike clang/GCC which have -Wno-error= which we use extensively. Until Microsoft addresses these issues, you'll have to use NOWERROR=1 when building with MSVC. Also, some cleanup.
* Change debugger command handler parameter vector element type from ↵ AJR2022-08-021-158/+173
| | | | std::string to std::string_view
* debugger: Impose an arbitrary upper limit on the count parameter of the gni ↵ AJR2022-05-221-0/+6
| | | | command to prevent denial of service
* Add time command to MAME debugger. Returns current machine time. (#9727) tedgreen992022-05-081-0/+10
|
* Debugger feature improvements AJR2022-03-271-0/+53
| | | | | | | | - Add 'gbt' and 'gbf' debugger commands to step until a true or false conditional branch has been detected. - Update over 100 of the disassemblers in MAME to output a new STEP_COND flag for all conditional branches. Besides being used for execution of the new 'gbt' and 'gbf' commands, this flag also now helps the debugger 'out' command to properly handle conditional return instructions. - Remove STEP_OVER from many instructions that aren't actually subroutine calls (e.g. DJNZ on Z80). A 'gni' debugger command (go next instruction) has been added to accommodate some of the misuse. - Add instruction flag support to several more disassemblers that lacked them entirely (e.g. st62xx) - Don't pass over delay slots for debugging in ASAP core
* docs: Added page describing how MAME searches for media. Vas Crabb2022-03-101-5/+5
| | | | | | | Also made error messages for missing CHDs and missing files for software parts using the image file loader show search paths, and changed the (poorly named) bitbanger device to use the image file loader rather than the ROM loader for software items.
* debugcmd.cpp: Modernize implementation details of mini_printf AJR2022-02-281-49/+46
|
* Remove fileio.h from emu.h AJR2022-02-111-5/+4
|
* Render-related cleanup AJR2021-12-301-0/+1
| | | | | | | - Undo inclusion of screen.h within render.h and update many source files that were stealth-including the former - Move texture_format enum to rendertypes.h - rendlay.h: Make a few methods static - ui/info.cpp: Use C++11-style iteration for render targets
* fixed size prefix in find command [smf] smf-2021-12-281-1/+1
|
* srcclean in preparation for branching 0.237 release Vas Crabb2021-10-241-1/+1
|
* Tie up a few loose ends: Vas Crabb2021-10-201-47/+75
| | | | | | | | | | | debugger: Octal cheats for octal address spaces. frontend: Pass events for automatically generated menu items to the plugin - they will have index zero. frontend: Don't try calling the data plugin from the main menu if the system isn't starting yet - doing so will prevent the data plugin from loading at all.
* -debugger: Finished updating commands and documentation. Vas Crabb2021-10-191-111/+133
| | | | | | | | | | | | | | | | | * Updated cheat commands to work with arbitrary devices and address spaces. You can still only search RAM areas in a single address space at a time, but any address space of any device can be used now. * Made the cheatinit/cheatrange commands not affect current state if the arguments are invalid. Also fixed some bugs in the cheat commands. * Updated documentation for cheat commands, and added a simple worked example. Also added single-sentence descriptions of what (break|watch|register)points are to the top of the relevant pages. -frontend improvements: * Added a bit more info to the about box, moved the VCS revision to the heading. * Don't show "not" codes in prompts - they're not helpful.
* Still more user experience improvements: Vas Crabb2021-10-181-146/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the default mapping for UI select to not trigger on Alt+Enter fullscreen toggle. (Fullscreen toggle still doesn't work in menus - actually fixing that is complicated.) frontend: Made the about box wrap text properly, made the title and backtrack menu item always visible, and added a footer with the VCS revision. frontend: Don't highlight the favourites and info toolbar buttons if there's no selection (can happen if filters produce no results). Also made the info viewer appear even if no info is available - it's less confusing to see an empty menu than wonder why clicking the button does nothing. debugger: Added a register points view to the GUI debuggers, to go with the breakpoints and watchpoints views. debugger: Extended [brw]p(clear|(en|dis)able) commands to accept multiple arguments to perform the same action on multiple (break|watch|register)points at once. Also made rplist accept a CPU for showing a single CPU's register points ([bw]plist already support this). docs: Updated registerpoints debugger commands page, and updated other pages for latest extensions to syntax.
* More user experience improvements: Vas Crabb2021-10-151-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | frontend: Made it possible to cancel a media audit while it's in progress. Also made the media audit multi-threaded so it's faster. frontend: Made the DIP switches in the DIP switch preview clickable. frontend: Made the system and software selection menus leave focus on the same system when clearing the search rather than jumping to the first item. Also fixed a couple of bugs in the logic for keeping the selected item visible. frontend: Fixed a few places that weren't showing localised system names. frontend: Made UI Cancel clear a search in the file manager the same way it does on the system and sofware selection menus. frontend: Made it possible for plugin menus to handle UI Cancel more naturally, backing up to the previous plugin menu rather than dropping straight back to the list of plugins. Updated the autofire, cheat and cheatfind plugins, and fixed a few other issues in the cheatfind plugin. debugger: Made the mount and unmount commands accept instance names as well as brief instance names. Also updated another page of debugger documentation.
* More user experience improvements: Vas Crabb2021-10-141-71/+89
| | | | | | | | | | | | | | | | | | | | | | | | | frontend: Allow clicking the adjuster arrows on menu items. This allows things like video options and DIP switches to be configured using a mouse only. Also fixed a bug preventing paging menus with a mouse if the first item scrolled off the bottom is not selectable. debugger: Allow wplist and bplist to accept a CPU argument to list breakpoints/watchpoints for a single CPU only. debugger: Fixed some corner cases in address space syntax in memory accesses, and allowed memory region accesses to use tags relative to the visible CPU. emu/softlist.cpp: Ignore notes elements when loading software lists. It's effectively a comment that isn't a comment syntactically, it's being used for things that are not useful to display in the internal UI, and it slows down startup. docs: Updated three more pages of debugger documentation. Also updated more of the built-in debugger help. minimaws: Fixed up schema for software list notes, made sofware list notes display initially collapsed.
* Various improvements to the user experience: Vas Crabb2021-10-131-33/+36
| | | | | | | | | | | | | | | | | | Extended the memory access prefixes in debugger expressions to support address space names. Made the debugger history command aware of how much history it has collected, and added a help topic for it to the built-in debugger help. Started updating the documentation for the web site, and corrected some of the more misleading built-in debugger help. Made some corrections to Chinese localisation after discussion with YuiFAN. Darkened the UI red colour a little. cpu/m6502/st2205u.h: Marked sound imperfect.
* Fix pcatmem command (probably regressed in ↵ AJR2021-10-051-1/+1
| | | | 360d3a5950f0649270822e2db1ea25028eabd18b)
* debugger: Extended target address syntax to include device/address space. ↵ Vas Crabb2021-10-011-785/+1016
| | | | | | | | | | | | | | | | | | | (#8630) Added a validity check to ensure address space names are tag-like and unique, since they're now used as identifiers in debugger commands. Extended the syntax for target addresses to allow them to be qualified with a colon followed by an optional device tag and/or address space name. If only the device needs to be specified, a debugger CPU number may also be used. This makes commands like bpset and wpset more flexible, as they can operate on CPUs other than the currently visible CPU. Commands like find, fill, dump and load are more flexible as they can access any space of any device. Removed now-redundant CPU parameters from many commands, and renamed pcatmemp to pcatmem for consistency with other commands. Extended region syntax for saver/loadr to support tags relative to the visible CPU (e.g. you can use "." for the region with the same name as the visible CPU, or "^sibling" syntax). Added an optional root device parameter to memdump. Changed interpretation of Boolean values to support numeric expressions as well as true/false strings and literal 1/0. Added checks that the specified device is CPU-like to various commands that require a CPU (e.g. focus). Previously these commands would crash or trigger an assertion failure if a tag for a non-CPU devices was specified. Fixed the cpunum symbol so it uses the same rules for determining what is or isn't a CPU as parameter parsing. Made device_t sanitise subtags better. Previously you could cause an assertion failure or crash MAME by giving it unexpected relative tags via Lua or the debugger. Added help topic alias support, and reworked the data structures to improve the performance of looking up debugger commands and help topics. Removed the "ref" parameter from debugger command functions (std::bind can hold extra argument values for you if you need them). Also added an error message if duplicate debugger commands are registered. Updated help for commands that changed syntax, and also updated summaries for some commands that had changed in the past without corresponding help updates.
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-3/+3
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Revert "Allow the bpset/wpset/rpset & map commands to act on any cpu, by ↵ Vas Crabb2021-08-221-27/+22
| | | | | | | | | prefixing the index or name with a # and passing as the first parameter. [smf]" This reverts commit f4213dc209ebf2247f3c7e46f32d9bd2711bb374. The issue that the syntax used for this clashes with syntax for decimal numbers was never resolved.
* Debugger-related feature removals and cleanup AJR2021-08-151-47/+9
| | | | | | | | - Remove the hotspot read tracker. This was never robustly implemented, but changes to the memory system made it much less useful, and the "speedup opportunities" which it aimed to determine are not very important from a current emulation standpoint. - Remove the CURSP/GENSP state symbol and the generic sp() getter. Stacking semantics vary too much between CPU architectures for this to be of much use. (A "SP" symbol has been added to a few CPU cores whose stack pointers were otherwise not being registered.) - Remove the cached pointer to device_state_interface and the state() fast accessor from device_t. Most users of device_state_interface either already had a pointer to the specific CPU device type or needed to check first for the presence of the interface. - Change the PC memory write tracker to use pcbase(), which works even when the instruction callback is masked out, instead of peeking at the PC history index. - Remove some obsolete watchpoint-related definitions from machine.h.
* Allow the bpset/wpset/rpset & map commands to act on any cpu, by prefixing ↵ smf-2021-07-281-22/+27
| | | | the index or name with a # and passing as the first parameter. [smf]
* Add %o format support to debugger printf command AJR2021-04-061-0/+26
|
* debug: add cls command to clear console buffer hap2021-02-161-0/+11
|
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-1/+1
| | | | | | | | | | * 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