summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* srcclean and cleanup (nw) Vas Crabb2020-06-211-5/+5
|
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* Debugger: add `condump` command to export console buffer to a log file (#6781) Stevie-O2020-06-071-0/+37
| | | | | | | | 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-4/+39
|\ | | | | 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-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+25
|/ | | | | | | | | | | | | - 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-2/+1
| | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | * 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
|
* Use std::forward_list instead of custom linked structure and eliminate last ↵ AJR2019-12-041-25/+18
| | | | use of auto_alloc in src/emu (nw)
* (nw) get rid of the rest of assert_always - it's better to be explicit about ↵ Vas Crabb2019-09-201-2/+4
| | | | what this thing is supposed to do
* -debugcon: Added CMDFLAG_CUSTOM_HELP, in order to flag custom ↵ MooglyGuy2019-07-071-0/+25
| | | | device-specific commands that have custom help text. [Ryan Holtz]
* debugcpu.cpp: Move scripting functions down into console (nw) AJR2018-07-261-0/+66
|
* srcclean (nw) Vas Crabb2017-10-221-1/+1
|
* device_state_interface: Polymorphism and std::function for entries (nw) (#2690) ajrhacker2017-10-121-3/+5
| | | | | | | | | | | * 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-5/+5
| | | | (#2170)
* general cleanup: Vas Crabb2017-05-231-1/+1
| | | | | | | | | | | * 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.
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* C++-ification of debugger code (misc std::string/std::vector adoption mainly) Nathan Woods2017-03-031-2/+5
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-7/+7
| | | | | | | | | | | | * 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
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-1/+1
|
* more TRUE/FALSE cleanup (nw) Miodrag Milanovic2016-10-221-9/+10
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-7/+7
| | | | | 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
* for bool type use true and false (nw) Miodrag Milanovic2016-07-311-1/+1
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-151/+87
| | | | | | | | * 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
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-1/+1
|
* Move more things to type-safe printf Vas Crabb2016-03-011-30/+14
|
* put debug_view back in machine due to issues with QT (nw) Miodrag Milanovic2016-01-121-5/+5
|
* created debugger_manager, now this one owns debug_view_manager (nw) Miodrag Milanovic2016-01-121-6/+6
|
* removed memory tracking (nw) Miodrag Milanovic2016-01-081-1/+1
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-7/+7
|
* Some cleanups and init fixes with help of ReSharper C++ (nw) Miodrag Milanovic2015-11-111-2/+1
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+565