summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.cpp
Commit message (Collapse)AuthorAgeFilesLines
* emu/debug: Extended memory commands for region and space (#13767) holub2025-08-301-1/+134
|
* debugger: symlist usability + symbol table extensibility (#13694) dave-br2025-05-201-1/+2
| | | | | | | 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.
* 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.
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-181-10/+14
| | | | divtlb: Wrap the constants
* Revert "Make numbers signed in debugger where it matters" Vas Crabb2022-11-271-10/+10
| | | | | | | | | | | | | | 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-10/+10
| | | | | | | - 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
* Addressed some Lua scripting pitfalls. (#9294) Vas Crabb2022-02-121-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Addressed pure virtual function call crash on end of emulation session if you haven't explicitly removed all address space taps, memory corruption on end of emulation session if you haven't explicitly removed all address space change notifiers, and symbol being garbage-collected out from under you while you have parsed expressions or other symbol tables that depend on them. Removed the copy constructor for parsed expressions as the underlying C++ copy constructor appears to be broken, and simplified symbol table constructors. Also made symbol table add methods return the new entry to avoid the need for an extra lookup. Fixed breakpoint/watchpoint objects being inappropriately copied into the tables returned by bplist() and wplist(), allowing the enabled property to be modifiable for breakpoint and watchpoint objects in Lua. Fixed drivers and devices causing a new memory pass-through handler to be allocated on each soft reset, and fixed multiple instances of taps being installed in the event the machine is reset before the tap is removed. Added classes for managing broadcast subscriptions, and adapted address spaces to use this for change notifications.
* debugger: Memory accesses in expressions don't support taking the first ↵ Vas Crabb2021-10-201-3/+3
| | | | exposed space (yet).
* express.cpp: Fix regression in interpreting db@, ib@, ob@ and similar memory ↵ AJR2021-10-191-0/+4
| | | | access operators
* More user experience improvements: Vas Crabb2021-10-141-146/+146
| | | | | | | | | | | | | | | | | | | | | | | | | 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-183/+136
| | | | | | | | | | | | | | | | | | 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.
* debugger: Extended target address syntax to include device/address space. ↵ Vas Crabb2021-10-011-5/+9
| | | | | | | | | | | | | | | | | | | (#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.
* debug/express.cpp: Fix parsing for preincrement & predecrement operators; ↵ AJR2021-01-241-85/+68
| | | | make debugging function print_tokens usable again
* Much more core std::string_view modernization AJR2021-01-201-3/+3
| | | | | | | | | | | | | | | - 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
* Fix most implicit fallthrough warnings from clang Vas Crabb2020-11-171-1/+1
|
* express.cpp: Replace simple_list with std::list in parsing AJR2020-09-031-50/+77
| | | | * Report too few or too many function parameters in debug expressions as expression errors instead of exiting MAME with a fatal error
* Fix crash when attempting to write to memory from debugger (nw) AJR2020-05-261-2/+2
|
* Debugger expression and memory access overhaul AJR2020-05-251-37/+557
| | | | | | | | | | | | | - Memory references in expressions no longer default to the console's visible CPU if no device name was specified, except when entered through the console itself. Expressions in view windows now use the context of the currently selected device instead. - The pcatmem debug command and similar qt mouseover function now produce an error message if the initial address translation fails. Related internal changes (nw) - The debugger_cpu class no longer interprets memory accesses. The existing routines have been moved into symbol_table (which used to invoke them as callbacks), and reimplemented in most other places. Thecode duplication is a bit messy, but could be potentially improved in the future with new utility classes. - The cheat engine no longer needs to hook into the debugger_cpu class or instantiate a dummy instance of it. - The inclusion of debug/express.h within emu.h has been undone. Some debugging structures now need unique_ptr to wrap the resulting incomplete classes; hopefully the performance impact of this is negligible. Another direct consequence is that the breakpoint, watchpoint and registerpoint classes are no longer inside device_debug and have their own source file. - The breakpoint list is now a std::multimap, using the addresses as keys to hopefully expedite lookup. - The visible CPU pointer has been removed from the debugger_cpu class, being now considered a property of the console instead. - Many minor bits of code have been simplified.
* Make expressions octal for applicable address spaces in disassembly view AJR2020-04-131-45/+46
| | | | | | | | | | debug/express.cpp, debugcpu.cpp: General cleanup (nw) - Change default base from hardcoded macro to dynamic parameter for parsed_expression - Change symbol table parameters and variables to references or std::reference_wrapper - Remove the (unused) ability to construct a parsed_expression without a symbol table - Eliminate symbol_table &table and void *memory_param arguments from callbacks (superfluous now that std::function can bind everything necessary) - Eliminate globalref pointer from symbol_table - Add explicitly defaulted move constructor and move assignment operator
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-6/+6
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* use C++ library includes (nw) firewave2020-01-221-1/+1
|
* misc cleanup: Vas Crabb2019-11-181-5/+4
| | | | | | | * Got rid of some more simple_list in core debugger code * Fixed a buffer overrun in wavwrite (buffer half requried size) * Slightly reduced dependencies and overhead in wavwrite * Made new disassembly windows in Qt debugger default to current CPU
* debug/express.cpp: Use std::deque for token stack (nw) AJR2018-07-261-32/+16
|
* Grammar police (nw) Olivier Galibert2018-02-241-3/+3
|
* (nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get Vas Crabb2017-12-011-47/+26
| | | | | rid of reference constants in the debugger in favour of capturing the value in the bind/lambda (less ugly casting)
* fix building with MSVC (nw) smf-2017-03-291-1/+1
|
* express: More robust parsing fix (nw) Olivier Galibert2017-03-271-5/+10
|
* disable: reverse polarity (nw) Olivier Galibert2017-03-261-8/+8
|
* express: More robust memory access operator parsing (nw) Olivier Galibert2017-03-261-1/+1
|
* debugger_access: Refactor [O. Galibert] Olivier Galibert2017-03-021-12/+14
|
* Make debugger fall back from binary to default base on 0b prefix Vas Crabb2017-02-031-1/+12
| | | | | * This makes expressions like 0B12 parse as hex in hex memory spaces * Where there's ambiguity (e.g 0B01) binary takes precedence
* Created a new debugger command 'tracesym' Nathan Woods2017-01-151-9/+10
| | | | 'tracesym' is intended to be a shorthand of 'tracelog', whereby the user doesn't have to specify a format string; the default format string is used
* debugger: use 0o for octal prefix, and add support for binary with 0b a la ↵ Vas Crabb2017-01-061-22/+43
| | | | C++, also support uppercase radix speifier
* Merge pull request #980 from shattered/_ad3979c R. Belmont2017-01-051-0/+3
|\ | | | | debugger: parse octal expressions (prefixed by '0')
| * debugger: parse octal expressions (prefixed by '0') Sergey Svishchev2016-06-211-0/+3
| |
* | Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* | Revert "Added IS_ENABLED, so we have compiler check for non used part, it is ↵ Miodrag Milanovic2016-11-121-1/+1
| | | | | | | | | | | | checked but not compiled in (nw)" This reverts commit c0407f073bf7afe26407c4add5cfeaf7104913c9.
* | Added IS_ENABLED, so we have compiler check for non used part, it is checked ↵ Miodrag Milanovic2016-11-111-1/+1
| | | | | | | | | | | | but not compiled in (nw) false and true now used instead of integer where used as bool
* | NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-46/+46
|/ | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* tagged_list to unordered_map for debugger (nw) Miodrag Milanovic2016-06-181-8/+8
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-8/+8
| | | | | | | | * Eliminate globals/file statics * Remove lots of stuff from global scope * Use std::function for custom command registration * Eliminate some trampolines * Build fixes from Vas Crabb and balr0g
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-1/+1
|
* Iterate over core classes C++11 style AJR2016-03-311-8/+8
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* Revert "Fix for hang, emu_options::add_slot_options was changed, other ↵ Miodrag Milanovic2016-01-201-3/+3
| | | | | | things are just cleanup (nw)" This reverts commit 841a55985e60a16f745422fb9aa06c420d8be8ba.
* Fix for hang, emu_options::add_slot_options was changed, other things are ↵ Miodrag Milanovic2016-01-181-3/+3
| | | | just cleanup (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-61/+61
|
* Some cleanups and init fixes with help of ReSharper C++ (nw) Miodrag Milanovic2015-11-111-2/+2
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+1753