summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug
Commit message (Collapse)AuthorAgeFilesLines
* debugcmd: update prev commit: change out+app to in+out+ate hap3 days1-3/+3
|
* debugcmd: correct trace file append hap3 days1-1/+1
|
* -cpu/e132xs.cpp: Improved exception emulation: Vas Crabb2025-04-014-1/+369
| | | | | | | | | | * Fixed behaviour of exceptions in delay slots, and fixed recompiler not updating ILC and P for some exceptions. * Implemented privilege error exception on setting L in user mode for interpreter. -emu/debug, osd/modules/debugger: Added an option to show exceptionpoints in breakpoints windows.
* Miscelaneous minor fixes: Vas Crabb2025-03-301-28/+28
| | | | | | | | | | | | | | | Changed "Exception Points" to "Exceptionpoints" in the debugger documentation and help. This better matches "Watchpoints" and "Registerpoints". Also, it's very confusing that you see the help topic listing showing "Exception Points" but typing "help Exception Points" doesn't actually work. cpu/e132xs: Fixed a flags issue in the recompiler. misc/dgpix.cpp: Demoted The X-Files to not working with unemulated protection. skeleton/turnierdart.cpp: The srcclean on this file was missed.
* diexec: Add callback to allow debugger to break into the middle of wait-type ↵ AJR2024-11-172-63/+158
| | | | | | | | | | instructions whose execution time is normally indefinite. When this happens, a special message may be printed to the debug console stating the location of the last actual instruction executed before the wait (if there was one). Note that since the callback ignores the current value of the program counter, this special type of debugger break cannot be entered through breakpoints or instruction stepping commands. The callback also leaves no effect on PC history tracking or trace logs. * cpu/hd61700, cpu/tms32031: Add standard IRQ callback * cpu/m68000gen.py: Change name of invoked executable to bin/python3 * cpu/m6809: Eliminate PC "massaging" for SYNC and similar instructions
* emu/debug, osd/modules/debugger/qt: Clean up #includes a bit AJR2024-09-3012-15/+12
|
* emu/debug/dvdisasm.cpp: Fixed bad display if view is scrolled horizontally. ↵ dave-br2024-08-242-21/+23
| | | | | (#12679) debugger/win/debugwininfo.cpp: Don't restrict maximum window sizes.
* 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
|
* debug/express.cpp: Fix bad iterator comparison in postfix conversion. (#12197) invertego2024-03-301-1/+1
| | | | | | One iterator was being compared with another from the wrong container. I observed this by chance when I hit an assert in a debug MSVC build with checked iterators enabled. This bug could cause dereferencing of a past-the-end iterator in expressions ending with an operator.
* emu/debug/debugcmd.cpp: Add NUL-terminated string argument support to ↵ Patrick Mackinlay2024-03-212-33/+84
| | | | | | | 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-193-71/+49
| | | | | | | | | [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.
* coreutil.h: Eliminate core_crc32 wrapper function in favor of ↵ AJR2024-02-261-2/+1
| | | | util::crc32_creator
* Clean up several sprintf() deprecation warningss in non-3rdparty code. [R. ↵ arbee2023-06-033-6/+6
| | | | Belmont]
* debughlp: document gp command Patrick Mackinlay2023-05-231-1/+23
|
* 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.
* debugbuf.cpp: Note flaw in design AJR2023-03-301-0/+2
|
* Apply workaround for debugger history command consuming ridiculous amounts ↵ AJR2023-03-291-1/+1
| | | | of memory when jumping around large address spaces
* Various optimisations to code generaton. Vas Crabb2023-03-264-14/+14
| | | | | | | | | | | | | | | util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr. Bitmaps don't throw exceptions on allocation failure, they just become invalid. Almost nothing in MAME actually checks for this. emu/profiler.cpp: Abort if the profile stack overflows rather than throwing an exception. This is a developer feature and if it overflows, the code is broken. Calling a noreturn noexcept function generates less code than throwing an exception, which adds up. util/strformat.cpp: Traded away some unnecessary flexibility for more compact code. The stream objects must derive from std::basic_ostream now - they can't just be any old objects with the expected operators.
* mcs96: Translate first 256 bytes of main memory space to register space AJR2023-03-191-0/+2
| | | | * dvmemory.cpp: Fix oversight in recent refactoring (uninitialized variable)
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-184-90/+121
| | | | divtlb: Wrap the constants
* Interrupt callback rationalization AJR2023-03-112-7/+68
| | | | | | | | | | | - Make CPUs pass interrupt return PC as a second argument to standard_irq_callback - Add interrupt return PC to "Stopped at interrupt" message produced by debugger 'gint' command - Add messages to trace logs whenever interrupts are accepted - Attempt to step over interrupt routines for applicable debugger commands - Eliminate standard_irq_callback_member wrapper method - Update many CPU cores to invoke standard_irq_callback at the start of or during interrupt processing, rather than at the end or when the input line changes - Remove IRQ callbacks for some input lines that never cause interrupts - mb88xx, mcs48: Add IRQ callbacks for internal interrupts
* Fix debugger exception point hit message AJR2023-03-091-2/+2
|
* Various updates, mostly around Lua: Vas Crabb2023-03-071-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile Lua as C++. When Lua is compiled as C, it uses setjmp/longjmp for error handling, resulting in failure to unwind intermediate stack frames. Trying to ensure no objects with non-trivial destructors are in scope when raising a Lua error is error-prone. In particular, converting an exception to a Lua error becomes convoluted, and raising a Lua error from a constructor is effectively impossible. Updated Lua to 5.4.4 - this includes a brand-new garbage collector implementation with better performance. The main thing removed is the deprecated bitlib. Updated sol2 to version 3.3.0 - this adds support for Lua 5.4 and fixes a number of issues, including not correctly handling errors when Lua is built as C++. Updated LuaFileSystem to version 1.8.0 - this adds support for symbolic links on Windows, as well as Lua 5.4 compatibility. Updated LuaSQLite3 to version 0.9.5 - this fixes issues in multi-threaded environments, as well as Lua 5.4 compatibility. Fixed double-free after attempting to construct a debugger expression from Lua with an invalid string, and exposed expression error to Lua in a better way. Added warning level print function to Lua. Fixed saving cheats with shift operators in expressions, although this code isn't actually used as there's no cheat editor.
* debughlp.cpp: Use ovectorstream instead of static char array and sprintf AJR2023-02-122-8/+11
|
* Various input and OSD refactoring: Vas Crabb2023-01-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* debugcon.h: Remove long-obsolete macros AJR2023-01-081-4/+0
|
* debugbuf.cpp: Don't use paged formats for addresses in disassembler output ↵ AJR2023-01-071-2/+2
| | | | unless logical address width exceeds page size
* Revert "Make numbers signed in debugger where it matters" Vas Crabb2022-11-272-29/+31
| | | | | | | | | | | | | | 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-162-31/+29
| | | | | | | - 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-294-613/+619
|
* Reallow debugger single-step command to break into subroutines during ↵ AJR2022-09-141-0/+4
| | | | over/out stepping
* Fix regressions in debugger trace command from ↵ AJR2022-09-021-2/+3
| | | | d8d588262de1f11a529b208e470cff9b89a4cba6, including use-after-move issue
* Debugger changes AJR2022-08-289-152/+596
| | | | | | | - 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.
* misc: remove unused variables that may give compiler warning hap2022-08-231-2/+0
|
* 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-024-255/+267
| | | | std::string to std::string_view
* Prevent debugger commands from being evaluated when they are assignment ↵ AJR2022-06-111-1/+3
| | | | expressions and only supposed to be validated at the moment
* dvmemory.cpp: Small refactoring; verify that data written to memory spaces ↵ AJR2022-05-222-10/+38
| | | | read back as the same values
* debugger: Impose an arbitrary upper limit on the count parameter of the gni ↵ AJR2022-05-222-1/+8
| | | | command to prevent denial of service
* Add time command to MAME debugger. Returns current machine time. (#9727) tedgreen992022-05-083-0/+19
|
* Debugger feature improvements AJR2022-03-275-21/+220
| | | | | | | | - 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
* Fixed some debugger memory view annoyances and cleaned up Lua bindings. Vas Crabb2022-03-161-3/+17
| | | | | | | | | | | | Made the debugger memory view not depend on isprint which is affected by the global locale. Assume the OSD will display as ISO-8869-1 and replace problematic printable characters. Started changing Lua function bindings to use set_function to avoid potential issues related to ThePhD/sol2#608, and worked out what was causing problems with symbol table read_memory/write_memory. (They aren't really essential - you can do the same thing with the address space object itself, but they're easier to parameterise.)
* 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-282-50/+47
|
* debugcon.cpp: Use std::string_view in command parsing and eliminate initial ↵ AJR2022-02-212-140/+118
| | | | buffer copy
* Delete some unnecessary c_str() calls AJR2022-02-131-2/+2
|
* vegas.cpp: Cleanup: Vas Crabb2022-02-131-2/+2
| | | | | | | * Combine DUART interrupts. * Disabled SIO logging that had been left on. * Added system LED output and added it to sf0249 layout (hidden by default).