summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.h
Commit message (Collapse)AuthorAgeFilesLines
* debug/express.cpp: Use std::deque for token stack (nw) AJR2018-07-261-4/+2
|
* Grammar police (nw) Olivier Galibert2018-02-241-2/+2
|
* (nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get Vas Crabb2017-12-011-7/+6
| | | | | rid of reference constants in the debugger in favour of capturing the value in the bind/lambda (less ugly casting)
* general cleanup: Vas Crabb2017-05-231-9/+5
| | | | | | | | | | | * 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.
* disable: reverse polarity (nw) Olivier Galibert2017-03-261-6/+6
|
* debugger_access: Refactor [O. Galibert] Olivier Galibert2017-03-021-7/+11
|
* Fix OS X build (nw) AJR2017-02-111-0/+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.
* srcclean (nw) Vas Crabb2017-01-221-1/+1
|
* Created a new debugger command 'tracesym' Nathan Woods2017-01-151-2/+4
| | | | '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
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-28/+28
| | | | | | | | | | | | * 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-28/+28
| | | | | 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
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-1/+1
| | | | to inline functions (nw)
* tagged_list to unordered_map for debugger (nw) Miodrag Milanovic2016-06-181-4/+4
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-6/+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
|
* Avoid auto return types; silence some unused variable warnings (nw) AJR2016-03-311-1/+1
|
* Iterate over core classes C++11 style AJR2016-03-311-1/+1
| | | | | | | | 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).
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-5/+5
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-3/+3
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-4/+4
|
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-43/+43
|
* Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-7/+7
| | | | | | | | | | | | space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h.
* Move generic templates from emucore.h to emutempl.h. Aaron Giles2011-02-071-1/+1
| | | | | | Normalize the tagged_list template to wrap a regular standard_list and have similar semantics. Updated a few direct callers to handle the changes.
* Cleanup & version bump.mame0140u1 Aaron Giles2010-11-081-19/+19
|
* Fix issues with setting condition expressions on break/watchpoints. Aaron Giles2010-11-081-0/+1
|
* Converted the expression engine to C++, did the usual cleanup. Aaron Giles2010-11-011-150/+369
|
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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!)
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd_free(). They take the same parameters as malloc() and free(). Renamed mamecore.h -> emucore.h. New C++-aware memory manager, implemented in emualloc.*. This is a simple manager that allows you to add any type of object to a resource pool. Most commonly, allocated objects are added, and so a set of allocation macros is provided to allow you to manage objects in a particular pool: pool_alloc(p, t) = allocate object of type 't' and add to pool 'p' pool_alloc_clear(p, t) = same as above, but clear the memory first pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type 't' and add to pool 'p' pool_alloc_array_clear(p, t, c) = same, but with clearing pool_free(p, v) = free object 'v' and remove it from the pool Note that pool_alloc[_clear] is roughly equivalent to "new t" and pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also note that pool_free works for single objects and arrays. There is a single global_resource_pool defined which should be used for any global allocations. It has equivalent macros to the pool_* macros above that automatically target the global pool. In addition, the memory module defines global new/delete overrides that access file and line number parameters so that allocations can be tracked. Currently this tracking is only done if MAME_DEBUG is enabled. In debug builds, any unfreed memory will be printed at the end of the session. emualloc.h also has #defines to disable malloc/free/realloc/calloc. Since emualloc.h is included by emucore.h, this means pretty much all code within the emulator is forced to use the new allocators. Although straight new/delete do work, their use is discouraged, as any allocations made with them will not be tracked. Changed the familar auto_alloc_* macros to map to the resource pool model described above. The running_machine is now a class and contains a resource pool which is automatically destructed upon deletion. If you are a driver writer, all your allocations should be done with auto_alloc_*. Changed all drivers and files in the core using malloc/realloc or the old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros instead, or the global_alloc_* macros if necessary. Added simple C++ wrappers for astring and bitmap_t, as these need proper constructors/destructors to be used for auto_alloc_astring and auto_alloc_bitmap. Removed references to the winalloc prefix file. Most of its functionality has moved into the core, save for the guard page allocations, which are now implemented in osd_alloc and osd_free.
* Exposed an address space for EEPROM devices. This has several Aaron Giles2009-12-281-2/+1
| | | | | | | | | | | | | | | | | | side-effects: - EEPROM memory is now visible in the debugger - EEPROM memory can be accessed like any CPU/device memory (i.e., use eeprom.b@<addr> instead of eeprom.eb@<addr>) Removed support in the expression engine for EEPROM-specific accesses. Updated all systems that muck directly with EEPROM memory to use memory accessors instead on the EEPROM address space. Extended the devtempl.h file to support device address spaces. Cleaned up romload a bit to make it clear that region flags are enforced for any device with an address space, not just CPUs.
* Results of running the latest srcclean. Aaron Giles2009-12-281-5/+5
|
* Memory references can now explicitly specify logical or physical access Aaron Giles2009-10-011-7/+12
| | | | | | by prepending with an 'l' or 'p'. Logical remains the default. Example: ppb@1000 = physical program space byte at address $1000. ldw@2000 = logical data space word at address $2000.
* Further debugger cleanup. Symbol tables now have a global ref Aaron Giles2008-11-221-10/+12
| | | | | as well as a per-symbol ref. Debugcpu is now clear of active CPU references and global Machine references.
* Debugger interfaces cleanup. Still more to do but this compiles and Aaron Giles2008-11-211-5/+5
| | | | | | | works. Added callback parameters to the expression engine. Improved CPU parsing so you can use a CPU tag or index in most commands that take one. Switched to passing CPU and address space objects around where appropriate. Lots of other minor tweaks.
* Added expression validation callback to verify names for CPUs and Aaron Giles2008-08-071-4/+15
| | | | | | | | | | | | | | | | | | memory regions. Extended error codes to report incorrect memory spaces, memory names, or memory sizes. Added verification callback to the debugger to validate CPU and memory region names, as well as verifying that a requested address space exists for a given CPU. Added support for oneshot cheats (those with only an "on" script). They are activated via UI_SELECT in the cheat menu, and pop up a message when activated. Also added a "Reset All" item in the cheat menu to reset all cheats back to their default state, and added support for UI_SELECT on a non-oneshot cheat so that it resets that cheat to its default value. Restored previous behavior that allowed popmessage() messages to overlay menus and other UI.
* Changed symbol table reference parameters to void * from UINT32. Aaron Giles2008-07-311-6/+6
|
* Region classes go bye-bye. Aaron Giles2008-07-281-4/+1
|
* Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer value, regions are now referred to by a region class and a region tag. The class specifies the type of region (one of CPU, gfx, sound, user, disk, prom, pld) while the tag uniquely specifies the region. This change required updating all the ROM region definitions in the project to specify the class/tag instead of region number. Updated the core memory_region_* functions to accept a class/tag pair. Added new memory_region_next() function to allow for iteration over all memory regions of a given class. Added new function memory_region_class_name() to return the name for a given CPU memory region class. Changed the auto-binding behavior of CPU regions. Previously, the first CPU would auto-bind to REGION_CPU1 (that is, any ROM references would automatically assume that they lived in the corresponding region). Now, each CPU automatically binds to the RGNCLASS_CPU region with the same tag as the CPU itself. This behavior required ensuring that all previous REGION_CPU* regions were changed to RGNCLASS_CPU with the same tag as the CPU. Introduced a new auto-binding mechanism for sound cores. This works similarly to the CPU binding. Each sound core that requires a memory region now auto-binds to the RGNCLASS_SOUND with the same tag as the sound core. In almost all cases, this allowed for the removal of the explicit region item in the sound configuration, which in turn allowed for many sound configurations to removed altogether. Updated the expression engine's memory reference behavior. A recent update expanded the scope of memory references to allow for referencing data in non-active CPU spaces, in memory regions, and in EEPROMs. However, this previous update required an index, which is no longer appropriate for regions and will become increasingly less appropriate for CPUs over time. Instead, a new syntax is supported, of the form: "[tag.][space]size@addr", where 'tag' is an optional tag for the CPU or memory region you wish to access, followed by a period as a separator; 'space' is the memory address space or region class you wish to access (p/d/i for program/data/I/O spaces; o for opcode space; r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword. Cleaned up ROM definition flags and removed some ugly hacks that had existed previously. Expanded to support up to 256 BIOSes. Updated ROM_COPY to support specifying class/tag for the source region. Updated the address map AM_REGION macro to support specifying a class/tag for the region. Updated debugger windows to display the CPU and region tags where appropriate. Updated -listxml to output region class and tag for each ROM entry.
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-171-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM data, and the size is in terms of units, not bytes. Updated all drivers accordingly. Changed the ROM loading code to actually alter the region flags based on the CPU endianness and bus width when creating the region, rather than fixing them up on the fly. This means that callers to memory_region_flags() will get the correct results. Changed the expression engine to use two callbacks for read/write rather than relying on externally defined functions. Expanded memory access support in the expression engine. Memory accesses can now be specified as [space][num]<size>@<address>. 'space' can be one of the following: p = program address space of CPU #num (default) d = data address space of CPU #num i = I/O address space of CPU #num o = opcode address space of CPU #num (R/W access to decrypted opcodes) r = direct RAM space of CPU #num (always allows writes, even for ROM) e = EEPROM index #num c = direct REGION_CPU#num access u = direct REGION_USER#num access g = direct REGION_GFX#num access s = direct REGION_SOUND#num access The 'num' field is optional for p/d/i/o/r, where is defaults to the current CPU, and for e, where it defaults to EEPROM #0. 'num' is required for all region-related prefixes. Some examples: w@curpc = word at 'curpc' in the active CPU's program address space dd@0 = dword at 0x0 in the active CPU's data address space r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space ew@7f = word from EEPROM address 0x7f u2q@40 = qword from REGION_USER2, offset 0x40 The 'size' field is always required, and can be b/w/d/q for byte, word, dword, and qword accesses.
* 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/+160