summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcon.h
Commit message (Collapse)AuthorAgeFilesLines
* 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