summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcon.h
Commit message (Collapse)AuthorAgeFilesLines
* Redoing offs_t to 64-bits expansion. MooglyGuy2026-05-011-1/+0
|
* lisa: Massive updates Olivier Galibert2026-01-071-2/+3
| | | | | | | | core: Better support for external mmus Note: I didn't expect to push that one right now, it's missing documentation among other things, but since some people seems to be interested to work on that driver I don't want to hold them.
* emu/debug: Extended memory commands for region and space (#13767) holub2025-08-301-0/+6
|
* Various optimisations to code generaton. Vas Crabb2023-03-261-4/+4
| | | | | | | | | | | | | | | 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.
* debugcon.h: Remove long-obsolete macros AJR2023-01-081-4/+0
|
* Move debugger command parameter validation helpers into debugger_console AJR2022-10-291-2/+32
|
* Change debugger command handler parameter vector element type from ↵ AJR2022-08-021-5/+5
| | | | std::string to std::string_view
* debugcon.cpp: Use std::string_view in command parsing and eliminate initial ↵ AJR2022-02-211-9/+8
| | | | buffer copy
* Remove fileio.h from emu.h AJR2022-02-111-0/+1
|
* debugger: Extended target address syntax to include device/address space. ↵ Vas Crabb2021-10-011-8/+16
| | | | | | | | | | | | | | | | | | | (#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: add cls command to clear console buffer hap2021-02-161-1/+0
|
* debugcon.cpp, textbuf.cpp: More uses for std::string_view AJR2020-12-111-5/+5
|
* -emu/render.cpp: Load from all external artwork paths. Vas Crabb2020-10-131-21/+25
| | | | | | -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-121-47/+46
| | | | use smart pointers.
* Debugger: add `condump` command to export console buffer to a log file (#6781) Stevie-O2020-06-071-0/+1
| | | | | | | | 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.
* Merge pull request #6660 from Stevie-O/debug-console-logging R. Belmont2020-05-301-0/+4
|\ | | | | 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-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | Debugger expression and memory access overhaul AJR2020-05-251-0/+7
|/ | | | | | | | | | | | | - 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.
* Use std::forward_list instead of custom linked structure and eliminate last ↵ AJR2019-12-041-2/+3
| | | | use of auto_alloc in src/emu (nw)
* -debugcon: Added CMDFLAG_CUSTOM_HELP, in order to flag custom ↵ MooglyGuy2019-07-071-0/+3
| | | | device-specific commands that have custom help text. [Ryan Holtz]
* debugcpu.cpp: Move scripting functions down into console (nw) AJR2018-07-261-0/+4
|
* device_state_interface: Polymorphism and std::function for entries (nw) (#2690) ajrhacker2017-10-121-1/+1
| | | | | | | | | | | * device_state_interface: Polymorphism and std::function for entries (nw) - Create a templated subclass of device_state_entry to provide separate read/write interfaces for registers of varying widths. The efficiency impact of this should be minimal, given that this eliminates the need to make each byte width a subcase for reads and writes. - Create similarly templated "pseudo-register" versions of device_state_entry that provides custom read/write interfaces through std::function. The intent of this is to eventually replace the dummy register + state_export interface hitherto necessary to provide debugger access to bankswitched or computed state registers. - State registers can now be made read-only, and this is automatically done now when state_add is called with a std::function read handler but no write handler. This property is honored by MAME debug expressions. * Add override keyword (nw) * Remove explicit instantiations that were causing linking errors in tools build (nw)
* Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger ↵ npwoods2017-06-241-2/+2
| | | | (#2170)
* general cleanup: Vas Crabb2017-05-231-4/+7
| | | | | | | | | | | * move rarely-used output and pty interfaces out of emu.h * consolidate and de-duplicate forward declarations, also remove some obsolete ones * clean up more #include guard macros * scope down a few more things (nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h - this will make it far easier to keep them in sync with declarations than having them scattered through all the other files.
* C++-ification of debugger code (misc std::string/std::vector adoption mainly) Nathan Woods2017-03-031-2/+2
|
* Remove emu.h from headers (nw) Olivier Galibert2017-02-111-1/+0
| | | | | | | | | | | | Per Vas' request. If the compile fails for you (i'm thinking osx and windows native debuggers here in particular), add '#include "emu.h"' as first include of the cpp files that fail. Due to our use of precompilation and forced inclusion, emu.h must be included as the very first non-comment thing we do if we want to be sure msvc compiles are identical to gcc/clang ones. Doing it directly instead of through an include increases the correctness probability by a magnitude.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-3/+3
| | | | | | | | | | | | * 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
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-3/+3
| | | | | 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
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-4/+4
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-37/+63
| | | | | | | | * 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
* Add includes for dependency documentation. (nw) couriersud2016-04-091-0/+1
|
* Move more things to type-safe printf Vas Crabb2016-03-011-11/+24
|
* Update debugcon.h Con Huevos Guey2015-12-311-2/+2
| | | | | | | Increased MAX_COMMAND PARAMS and MAX_COMMAND_LENGTH to quadruple their previous size. The previous values did not have the capacity to allow trace logging of all registers at the same time in some CPUS. Setting the maximum to 128 should allow for capturing of systems with large symbolic lists (such as Playstation) if needed. For example, the following command would throw an error when trace logging a 68000 CPU because the maximum parameters (16) would be reached when attempting to capture all registers: trace 68K.log,0,{tracelog "A0=%08X, A1=%08X, A2=%08X, A3=%08X, A4=%08X, A5=%08X, A6=%08X, A7=%08X, D0=%08X, D1=%08X, D2=%08X, D3=%08X, D4=%08X, D5=%08X, D6=%08X, D7=%08X ",a0,a1,a2,a3,a4,a5,a6,a7,d0,d1,d2,d3,d4,d5,d6,d7}
* making logerror part of machine and device classes [Miodrag Milanovic] Miodrag Milanovic2015-11-011-1/+1
| | | | display tag of device that logged message
* License self-service. Aaron Giles2015-05-251-1/+1
| | | | | | License self-service. Mostly adding attribution where I made significant contributions. In a few cases files I previously missed were default-attributed to Nicola.
* lot more updated (nw) Miodrag Milanovic2015-05-111-5/+2
|
* Added dummy license headers for EMU section (nw) Miodrag Milanovic2015-05-071-0/+2
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-35/+35
|
* BIG update. Aaron Giles2011-03-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
* Split mame.c into mame.c and machine.c, the latter containing the Aaron Giles2010-06-301-1/+1
| | | | | | | | | | | | | | | | | | | running_machine definition and implementation. Moved global machine-level operations and accessors into methods on the running_machine class. For the most part, this doesn't affect drivers except for a few occasional bits: mame_get_phase() == machine->phase() add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...) add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...) mame_get_base_datetime() == machine->base_datetime() mame_get_current_datetime() == machine->current_datetime() Cleaned up the region_info class, removing most global region accessors except for memory_region() and memory_region_length(). Again, this doesn't generally affect drivers.
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
* > -----Original Message----- Aaron Giles2009-10-031-1/+0
| | | | | | | | | | | | | | | | | | > From: Atari Ace [mailto:atari_ace@verizon.net] > Sent: Wednesday, September 30, 2009 7:56 AM > To: submit@mamedev.org > Cc: atariace@hotmail.com > Subject: [patch] More static qualifiers > > Hi mamedev, > > This patch makes more of MAME static, primarily targeting functions > exported by header files that are in fact unused outside their own > file, and the chip emulators in machine/snes.c. It also degenericizes > some exported names in archimds, bublbobl, and lucky74. > > ~aa
* More debugger changes. Aaron Giles2008-12-031-3/+3
| | | | | | | | | | | | | | | | | Added the concept of 'subviews' to the debugger views. The core now creates a list of possible subviews, and the OSD can select between them. This removes code from the OSD that was previously required to find all possible memory and disassembly views. Added machine parameters to debugger console output functions. Fixed some oddities in the memory view. Moved globals to hang off of the machine structure. Fixed bug where the visiblecpu was not updated immediately upon a break.
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-09-111-4/+3
| | | | | | | | Subject: Machine -> machine This is a big patch adding running_machine* parameters and using "machine" where available.
* Robustified key behavior when the debugger is visible. Should now Aaron Giles2008-07-171-0/+2
| | | | | | | | | | | properly ignore the "break into debugger" keypress and not allow related characters to filter through. Removed some hacks related to making that work in the past. Changed osd_wait_for_debugger() to take a machine parameter and a "firsttime" parameter, which is set to 1 the first time the function is called after a break. The Windows debugger uses this to ensure that the debugger has focus when you break into it.
* Copyright cleanup: Aaron Giles2008-01-061-1/+1
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+97