mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
added first iteration of breakpoint view for the debugger
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@21 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -318,7 +318,7 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
|
||||
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14);
|
||||
if ((iAppLoaderEntry == (u32)-1) || (iAppLoaderSize == (u32)-1))
|
||||
{
|
||||
LOG(BOOT, "Invalid apploader. WTF.");
|
||||
LOG(BOOT, "Invalid apploader. Probably your image is corrupted.");
|
||||
return false;
|
||||
}
|
||||
VolumeHandler::ReadToPtr(Memory::GetPointer(0x81200000), iAppLoaderOffset + 0x20, iAppLoaderSize);
|
||||
|
@ -21,14 +21,15 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include "../HW/CPU.h"
|
||||
#include "../Host.h"
|
||||
|
||||
#include "Debugger_SymbolMap.h"
|
||||
#include "Debugger_BreakPoints.h"
|
||||
|
||||
using namespace Debugger;
|
||||
|
||||
std::vector<TBreakPoint> CBreakPoints::m_iBreakPoints;
|
||||
std::vector<TMemCheck> CBreakPoints::MemChecks;
|
||||
CBreakPoints::TBreakPoints CBreakPoints::m_BreakPoints;
|
||||
CBreakPoints::TMemChecks CBreakPoints::m_MemChecks;
|
||||
u32 CBreakPoints::m_iBreakOnCount = 0;
|
||||
|
||||
TMemCheck::TMemCheck()
|
||||
@ -54,7 +55,7 @@ bool CBreakPoints::IsAddressBreakPoint(u32 _iAddress)
|
||||
{
|
||||
std::vector<TBreakPoint>::iterator iter;
|
||||
|
||||
for (iter = m_iBreakPoints.begin(); iter != m_iBreakPoints.end(); ++iter)
|
||||
for (iter = m_BreakPoints.begin(); iter != m_BreakPoints.end(); ++iter)
|
||||
if ((*iter).iAddress == _iAddress)
|
||||
return true;
|
||||
|
||||
@ -65,7 +66,7 @@ bool CBreakPoints::IsTempBreakPoint(u32 _iAddress)
|
||||
{
|
||||
std::vector<TBreakPoint>::iterator iter;
|
||||
|
||||
for (iter = m_iBreakPoints.begin(); iter != m_iBreakPoints.end(); ++iter)
|
||||
for (iter = m_BreakPoints.begin(); iter != m_BreakPoints.end(); ++iter)
|
||||
if ((*iter).iAddress == _iAddress && (*iter).bTemporary)
|
||||
return true;
|
||||
|
||||
@ -75,7 +76,7 @@ bool CBreakPoints::IsTempBreakPoint(u32 _iAddress)
|
||||
TMemCheck *CBreakPoints::GetMemCheck(u32 address)
|
||||
{
|
||||
std::vector<TMemCheck>::iterator iter;
|
||||
for (iter = MemChecks.begin(); iter != MemChecks.end(); ++iter)
|
||||
for (iter = m_MemChecks.begin(); iter != m_MemChecks.end(); ++iter)
|
||||
{
|
||||
if ((*iter).bRange)
|
||||
{
|
||||
@ -102,7 +103,9 @@ void CBreakPoints::AddBreakPoint(u32 _iAddress, bool temp)
|
||||
pt.bTemporary = temp;
|
||||
pt.iAddress = _iAddress;
|
||||
|
||||
m_iBreakPoints.push_back(pt);
|
||||
m_BreakPoints.push_back(pt);
|
||||
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,19 +113,28 @@ void CBreakPoints::RemoveBreakPoint(u32 _iAddress)
|
||||
{
|
||||
std::vector<TBreakPoint>::iterator iter;
|
||||
|
||||
for (iter = m_iBreakPoints.begin(); iter != m_iBreakPoints.end(); ++iter)
|
||||
for (iter = m_BreakPoints.begin(); iter != m_BreakPoints.end(); ++iter)
|
||||
{
|
||||
if ((*iter).iAddress == _iAddress)
|
||||
{
|
||||
m_iBreakPoints.erase(iter);
|
||||
m_BreakPoints.erase(iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
|
||||
void CBreakPoints::ClearAllBreakPoints()
|
||||
{
|
||||
m_iBreakPoints.clear();
|
||||
m_BreakPoints.clear();
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
|
||||
void CBreakPoints::AddMemoryCheck(const TMemCheck& _rMemoryCheck)
|
||||
{
|
||||
m_MemChecks.push_back(_rMemoryCheck);
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
|
||||
void CBreakPoints::AddAutoBreakpoints()
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DEBUGGER_BREAKPOINTS_H
|
||||
#define _DEBUGGER_BREAKPOINTS_H
|
||||
|
||||
@ -50,17 +51,13 @@ struct TMemCheck
|
||||
|
||||
class CBreakPoints
|
||||
{
|
||||
private:
|
||||
|
||||
enum { MAX_NUMBER_OF_CALLSTACK_ENTRIES = 16384};
|
||||
enum { MAX_NUMBER_OF_BREAKPOINTS = 16};
|
||||
|
||||
static std::vector<TBreakPoint> m_iBreakPoints;
|
||||
|
||||
static u32 m_iBreakOnCount;
|
||||
|
||||
public:
|
||||
static std::vector<TMemCheck> MemChecks;
|
||||
|
||||
typedef std::vector<TBreakPoint> TBreakPoints;
|
||||
typedef std::vector<TMemCheck> TMemChecks;
|
||||
|
||||
static const TBreakPoints& GetBreakPoints() { return m_BreakPoints; }
|
||||
static const TMemChecks& GetMemChecks() { return m_MemChecks; }
|
||||
|
||||
// is address breakpoint
|
||||
static bool IsAddressBreakPoint(u32 _iAddress);
|
||||
@ -80,9 +77,20 @@ public:
|
||||
// Remove Breakpoint
|
||||
static void RemoveBreakPoint(u32 _iAddress);
|
||||
|
||||
static void AddMemoryCheck(const TMemCheck& _rMemoryCheck);
|
||||
|
||||
static void ClearAllBreakPoints();
|
||||
|
||||
static void AddAutoBreakpoints();
|
||||
|
||||
private:
|
||||
|
||||
static TBreakPoints m_BreakPoints;
|
||||
|
||||
static TMemChecks m_MemChecks;
|
||||
|
||||
static u32 m_iBreakOnCount;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -270,7 +270,8 @@ int LoadSymbolsFromO(const char* filename, unsigned int base, unsigned int count
|
||||
fseek (ifil, ELF_SH.offset, SEEK_SET);
|
||||
if (ELF_SH.size<0 || ELF_SH.size>0x10000000)
|
||||
{
|
||||
PanicAlert("WTF??");
|
||||
PanicAlert("Failed to load symbols from object file.\n"
|
||||
"Header size is invalid");
|
||||
}
|
||||
abuf = (unsigned char *)malloc (ELF_SH.size);
|
||||
fread (abuf, 1, ELF_SH.size, ifil);
|
||||
|
@ -46,7 +46,8 @@ namespace Memory
|
||||
|
||||
// GLOABL DEFINES
|
||||
|
||||
#define NOCHECK
|
||||
// #define NOCHECK
|
||||
|
||||
static const bool bFakeVMEM = false;
|
||||
|
||||
#ifndef LOGGING
|
||||
|
@ -99,23 +99,23 @@ int CSIDevice_GCController::RunBuffer(u8* _pBuffer, int _iLength)
|
||||
switch(command)
|
||||
{
|
||||
case CMD_RESET:
|
||||
{
|
||||
*(u32*)&_pBuffer[0] = SI_GC_CONTROLLER; // | SI_GC_NOMOTOR;
|
||||
iPosition = _iLength; // break the while loop
|
||||
}
|
||||
break;
|
||||
{
|
||||
*(u32*)&_pBuffer[0] = SI_GC_CONTROLLER; // | SI_GC_NOMOTOR;
|
||||
iPosition = _iLength; // break the while loop
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_ORIGIN:
|
||||
{
|
||||
LOG(SERIALINTERFACE, "SI - Get Origin");
|
||||
u8* pCalibration = reinterpret_cast<u8*>(&m_origin);
|
||||
for (int i = 0; i < (int)sizeof(SOrigin); i++)
|
||||
{
|
||||
_pBuffer[i ^ 3] = *pCalibration++;
|
||||
}
|
||||
}
|
||||
iPosition = _iLength;
|
||||
break;
|
||||
LOG(SERIALINTERFACE, "SI - Get Origin");
|
||||
u8* pCalibration = reinterpret_cast<u8*>(&m_origin);
|
||||
for (int i = 0; i < (int)sizeof(SOrigin); i++)
|
||||
{
|
||||
_pBuffer[i ^ 3] = *pCalibration++;
|
||||
}
|
||||
}
|
||||
iPosition = _iLength;
|
||||
break;
|
||||
|
||||
// Recalibrate (FiRES: i am not 100 percent sure about this)
|
||||
case CMD_RECALIBRATE:
|
||||
|
@ -43,6 +43,7 @@ void Host_UpdateDisasmDialog();
|
||||
void Host_UpdateLogDisplay();
|
||||
void Host_UpdateMemoryView();
|
||||
void Host_NotifyMapLoaded();
|
||||
void Host_UpdateBreakPointView();
|
||||
void Host_SetDebugMode(bool enable);
|
||||
|
||||
void Host_SetWaitCursor(bool enable);
|
||||
|
Reference in New Issue
Block a user