mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
Initial removal of the actual console functionality on windows.
This commit is contained in:
parent
70f3a069f2
commit
d45351a43f
@ -1,146 +0,0 @@
|
|||||||
// Copyright 2013 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <iostream>
|
|
||||||
#include <PowerPCDisasm.h> // Bochs
|
|
||||||
|
|
||||||
#include "Common/Common.h"
|
|
||||||
#include "Common/Thread.h"
|
|
||||||
#include "Core/Console.h"
|
|
||||||
#include "Core/Core.h"
|
|
||||||
#include "Core/CoreTiming.h"
|
|
||||||
#include "Core/HW/Memmap.h"
|
|
||||||
#include "Core/PowerPC/PPCAnalyst.h"
|
|
||||||
#include "Core/PowerPC/PPCSymbolDB.h"
|
|
||||||
#include "Core/PowerPC/PPCTables.h"
|
|
||||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
|
||||||
|
|
||||||
#define CASE1(x) if (!strcmp(cmd, (x)))
|
|
||||||
#define CASE(x) else if (!strcmp(cmd, (x)))
|
|
||||||
|
|
||||||
void Console_Submit(const char *cmd)
|
|
||||||
{
|
|
||||||
CASE1("r")
|
|
||||||
{
|
|
||||||
Core::StartTrace(false);
|
|
||||||
INFO_LOG(CONSOLE, "Read tracing started.");
|
|
||||||
}
|
|
||||||
CASE("w")
|
|
||||||
{
|
|
||||||
Core::StartTrace(true);
|
|
||||||
INFO_LOG(CONSOLE, "Write tracing started.");
|
|
||||||
}
|
|
||||||
CASE("trans")
|
|
||||||
{
|
|
||||||
TCHAR temp[256];
|
|
||||||
u32 addr;
|
|
||||||
sscanf(cmd, "%s %08x", temp, &addr);
|
|
||||||
|
|
||||||
if (addr)
|
|
||||||
{
|
|
||||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
|
||||||
u32 EA =
|
|
||||||
Memory::TranslateAddress(addr, Memory::FLAG_NO_EXCEPTION);
|
|
||||||
INFO_LOG(CONSOLE, "EA 0x%08x to 0x%08x", addr, EA);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUG_LOG(CONSOLE, "Syntax: trans ADDR");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CASE("call")
|
|
||||||
{
|
|
||||||
TCHAR temp[256];
|
|
||||||
u32 addr;
|
|
||||||
sscanf(cmd, "%s %08x", temp, &addr);
|
|
||||||
if (addr)
|
|
||||||
{
|
|
||||||
g_symbolDB.PrintCalls(addr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUG_LOG(CONSOLE, "Syntax: call ADDR");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CASE("llac")
|
|
||||||
{
|
|
||||||
TCHAR temp[256];
|
|
||||||
u32 addr;
|
|
||||||
sscanf(cmd, "%s %08x", temp, &addr);
|
|
||||||
if (addr)
|
|
||||||
{
|
|
||||||
g_symbolDB.PrintCallers(addr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUG_LOG(CONSOLE, "Syntax: llac ADDR");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CASE("pend")
|
|
||||||
{
|
|
||||||
CoreTiming::LogPendingEvents();
|
|
||||||
}
|
|
||||||
CASE("dump")
|
|
||||||
{
|
|
||||||
char temp[256];
|
|
||||||
char filename[256];
|
|
||||||
u32 start;
|
|
||||||
u32 end;
|
|
||||||
sscanf(cmd, "%s %08x %08x %s", temp, &start, &end, filename);
|
|
||||||
|
|
||||||
File::IOFile f(filename, "wb");
|
|
||||||
for (u32 i = start; i < end; i++)
|
|
||||||
{
|
|
||||||
u8 b = Memory::ReadUnchecked_U8(i);
|
|
||||||
fputc(b, f.GetHandle());
|
|
||||||
}
|
|
||||||
INFO_LOG(CONSOLE, "Dumped from %08x to %08x to %s",start,end,filename);
|
|
||||||
}
|
|
||||||
CASE("disa")
|
|
||||||
{
|
|
||||||
u32 start;
|
|
||||||
u32 end;
|
|
||||||
TCHAR temp[256];
|
|
||||||
sscanf(cmd, "%s %08x %08x", temp, &start, &end);
|
|
||||||
char disasm[256];
|
|
||||||
for (u32 addr = start; addr <= end; addr += 4)
|
|
||||||
{
|
|
||||||
u32 data = Memory::ReadUnchecked_U32(addr);
|
|
||||||
DisassembleGekko(data, addr, disasm, 256);
|
|
||||||
DEBUG_LOG(CONSOLE, "%08x: %08x: %s\n", addr, data, disasm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CASE("help")
|
|
||||||
{
|
|
||||||
ERROR_LOG(CONSOLE, "Dolphin Console Command List");
|
|
||||||
ERROR_LOG(CONSOLE, "scan ADDR - will find functions that are called by this function");
|
|
||||||
ERROR_LOG(CONSOLE, "call ADDR - will find functions that call this function");
|
|
||||||
ERROR_LOG(CONSOLE, "dump START_A END_A FILENAME - will dump memory between START_A and END_A");
|
|
||||||
ERROR_LOG(CONSOLE, "help - guess what this does :P");
|
|
||||||
ERROR_LOG(CONSOLE, "lisd - list signature database");
|
|
||||||
ERROR_LOG(CONSOLE, "lisf - list functions");
|
|
||||||
ERROR_LOG(CONSOLE, "trans ADDR - translate address");
|
|
||||||
}
|
|
||||||
CASE("lisd")
|
|
||||||
{
|
|
||||||
// PPCAnalyst::ListDB();
|
|
||||||
}
|
|
||||||
CASE("ipro")
|
|
||||||
{
|
|
||||||
PPCTables::PrintInstructionRunCounts();
|
|
||||||
}
|
|
||||||
CASE("lisf")
|
|
||||||
{
|
|
||||||
g_symbolDB.List();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ERROR_LOG(CONSOLE, "Invalid command");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef CASE1
|
|
||||||
#undef CASE
|
|
@ -1,10 +0,0 @@
|
|||||||
// Copyright 2013 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
|
|
||||||
// Simple debugging console currently residing in the Logging window. Not used much.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
void Console_Submit(const char *cmd);
|
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
@ -53,7 +53,6 @@
|
|||||||
<ClCompile Include="Boot\Boot_WiiWAD.cpp" />
|
<ClCompile Include="Boot\Boot_WiiWAD.cpp" />
|
||||||
<ClCompile Include="Boot\ElfReader.cpp" />
|
<ClCompile Include="Boot\ElfReader.cpp" />
|
||||||
<ClCompile Include="ConfigManager.cpp" />
|
<ClCompile Include="ConfigManager.cpp" />
|
||||||
<ClCompile Include="Console.cpp" />
|
|
||||||
<ClCompile Include="Core.cpp" />
|
<ClCompile Include="Core.cpp" />
|
||||||
<ClCompile Include="CoreParameter.cpp" />
|
<ClCompile Include="CoreParameter.cpp" />
|
||||||
<ClCompile Include="CoreTiming.cpp" />
|
<ClCompile Include="CoreTiming.cpp" />
|
||||||
@ -258,7 +257,6 @@
|
|||||||
<ClInclude Include="Boot\ElfReader.h" />
|
<ClInclude Include="Boot\ElfReader.h" />
|
||||||
<ClInclude Include="Boot\ElfTypes.h" />
|
<ClInclude Include="Boot\ElfTypes.h" />
|
||||||
<ClInclude Include="ConfigManager.h" />
|
<ClInclude Include="ConfigManager.h" />
|
||||||
<ClInclude Include="Console.h" />
|
|
||||||
<ClInclude Include="Core.h" />
|
<ClInclude Include="Core.h" />
|
||||||
<ClInclude Include="CoreParameter.h" />
|
<ClInclude Include="CoreParameter.h" />
|
||||||
<ClInclude Include="CoreTiming.h" />
|
<ClInclude Include="CoreTiming.h" />
|
||||||
@ -474,4 +472,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="ActionReplay">
|
<Filter Include="ActionReplay">
|
||||||
@ -137,7 +137,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="BootManager.cpp" />
|
<ClCompile Include="BootManager.cpp" />
|
||||||
<ClCompile Include="ConfigManager.cpp" />
|
<ClCompile Include="ConfigManager.cpp" />
|
||||||
<ClCompile Include="Console.cpp" />
|
|
||||||
<ClCompile Include="Core.cpp" />
|
<ClCompile Include="Core.cpp" />
|
||||||
<ClCompile Include="CoreParameter.cpp" />
|
<ClCompile Include="CoreParameter.cpp" />
|
||||||
<ClCompile Include="CoreTiming.cpp" />
|
<ClCompile Include="CoreTiming.cpp" />
|
||||||
@ -710,7 +709,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="BootManager.h" />
|
<ClInclude Include="BootManager.h" />
|
||||||
<ClInclude Include="ConfigManager.h" />
|
<ClInclude Include="ConfigManager.h" />
|
||||||
<ClInclude Include="Console.h" />
|
|
||||||
<ClInclude Include="Core.h" />
|
<ClInclude Include="Core.h" />
|
||||||
<ClInclude Include="CoreParameter.h" />
|
<ClInclude Include="CoreParameter.h" />
|
||||||
<ClInclude Include="CoreTiming.h" />
|
<ClInclude Include="CoreTiming.h" />
|
||||||
@ -1219,4 +1217,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -33,7 +33,6 @@
|
|||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/IniFile.h"
|
#include "Common/IniFile.h"
|
||||||
#include "Common/LogManager.h"
|
#include "Common/LogManager.h"
|
||||||
#include "Core/Console.h"
|
|
||||||
#include "DolphinWX/Frame.h"
|
#include "DolphinWX/Frame.h"
|
||||||
#include "DolphinWX/LogWindow.h"
|
#include "DolphinWX/LogWindow.h"
|
||||||
#include "DolphinWX/WxUtils.h"
|
#include "DolphinWX/WxUtils.h"
|
||||||
@ -44,7 +43,6 @@
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
||||||
EVT_CLOSE(CLogWindow::OnClose)
|
EVT_CLOSE(CLogWindow::OnClose)
|
||||||
EVT_TEXT_ENTER(IDM_SUBMITCMD, CLogWindow::OnSubmit)
|
|
||||||
EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear)
|
EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear)
|
||||||
EVT_CHOICE(IDM_FONT, CLogWindow::OnFontChange)
|
EVT_CHOICE(IDM_FONT, CLogWindow::OnFontChange)
|
||||||
EVT_CHECKBOX(IDM_WRAPLINE, CLogWindow::OnWrapLineCheck)
|
EVT_CHECKBOX(IDM_WRAPLINE, CLogWindow::OnWrapLineCheck)
|
||||||
@ -209,13 +207,6 @@ void CLogWindow::SaveSettings()
|
|||||||
ini.Save(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
ini.Save(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLogWindow::OnSubmit(wxCommandEvent& WXUNUSED (event))
|
|
||||||
{
|
|
||||||
if (!m_cmdline) return;
|
|
||||||
Console_Submit(WxStrToStr(m_cmdline->GetValue()).c_str());
|
|
||||||
m_cmdline->SetValue(wxEmptyString);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event))
|
void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
m_Log->Clear();
|
m_Log->Clear();
|
||||||
|
@ -82,7 +82,6 @@ private:
|
|||||||
void PopulateBottom();
|
void PopulateBottom();
|
||||||
void UnPopulateBottom();
|
void UnPopulateBottom();
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
void OnSubmit(wxCommandEvent& event);
|
|
||||||
void OnFontChange(wxCommandEvent& event);
|
void OnFontChange(wxCommandEvent& event);
|
||||||
void OnWrapLineCheck(wxCommandEvent& event);
|
void OnWrapLineCheck(wxCommandEvent& event);
|
||||||
void OnClear(wxCommandEvent& event);
|
void OnClear(wxCommandEvent& event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user