Previous 15994 Revisions Next

r10345 Wednesday 9th February, 2011 at 07:10:33 UTC by Curt Coder
Synced debugger fixes from MAME.
[src/emu/debug]debugcpu.c debugcpu.h

src/emu/debug/debugcpu.c
r10344r10345
9191   bool         debugger_access;
9292
9393   int            execution_state;
94   device_t *      m_stop_when_not_device;      // stop execution when the device ceases to be this
9495
9596   UINT32         bpindex;
9697   UINT32         wpindex;
r10344r10345
10931094   /* loop over CPUs and reset the transient flags */
10941095   for (device_t *device = machine.m_devicelist.first(); device != NULL; device = device->next())
10951096      device->debug()->reset_transient_flag();
1097   machine.debugcpu_data->m_stop_when_not_device = NULL;
10961098}
10971099
10981100
r10344r10345
17491751   assert(global->livecpu == NULL);
17501752   global->livecpu = &m_device;
17511753
1754   // if we're a new device, stop now
1755   if (global->m_stop_when_not_device != NULL && global->m_stop_when_not_device != &m_device)
1756   {
1757      global->m_stop_when_not_device = NULL;
1758      global->execution_state = EXECUTION_STATE_STOPPED;
1759      reset_transient_flags(*m_device.machine);
1760   }
1761
17521762   // update the target execution end time
17531763   m_endexectime = endtime;
17541764
r10344r10345
18041814
18051815   assert(global->livecpu == &m_device);
18061816
1807   // if we're stopping on a context switch, handle it now
1808   if (m_flags & DEBUG_FLAG_STOP_CONTEXT)
1809   {
1810      global->execution_state = EXECUTION_STATE_STOPPED;
1811      reset_transient_flags(*m_device.machine);
1812   }
1813
18141817   // clear the live CPU
18151818   global->livecpu = NULL;
18161819}
r10344r10345
22392242
22402243   assert(m_exec != NULL);
22412244
2242   m_flags |= DEBUG_FLAG_STOP_CONTEXT;
2245   global->m_stop_when_not_device = &m_device;
22432246   global->execution_state = EXECUTION_STATE_RUNNING;
22442247}
22452248
src/emu/debug/debugcpu.h
r10344r10345
349349   static const UINT32 DEBUG_FLAG_STEPPING_OVER   = 0x00000040;      // CPU is stepping over a function
350350   static const UINT32 DEBUG_FLAG_STEPPING_OUT      = 0x00000080;      // CPU is stepping out of a function
351351   static const UINT32 DEBUG_FLAG_STOP_PC         = 0x00000100;      // there is a pending stop at cpu->breakpc
352   static const UINT32 DEBUG_FLAG_STOP_CONTEXT      = 0x00000200;      // there is a pending stop on next context switch
353352   static const UINT32 DEBUG_FLAG_STOP_INTERRUPT   = 0x00000400;      // there is a pending stop on the next interrupt
354353   static const UINT32 DEBUG_FLAG_STOP_EXCEPTION   = 0x00000800;      // there is a pending stop on the next exception
355354   static const UINT32 DEBUG_FLAG_STOP_VBLANK      = 0x00001000;      // there is a pending stop on the next VBLANK
r10344r10345
358357
359358   static const UINT32 DEBUG_FLAG_STEPPING_ANY      = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT;
360359   static const UINT32 DEBUG_FLAG_TRACING_ANY      = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER;
361   static const UINT32 DEBUG_FLAG_TRANSIENT      = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | DEBUG_FLAG_STOP_CONTEXT |
360   static const UINT32 DEBUG_FLAG_TRANSIENT      = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC |
362361         DEBUG_FLAG_STOP_INTERRUPT | DEBUG_FLAG_STOP_EXCEPTION | DEBUG_FLAG_STOP_VBLANK | DEBUG_FLAG_STOP_TIME;
363362};
364363

Previous 15994 Revisions Next


© 1998-2018 The MESS Team