mirror of
https://github.com/DaedalusX64/daedalus.git
synced 2024-06-01 18:58:00 -04:00
Fix DAEDALUS_DEBUG_DYNAREC
This commit is contained in:
parent
8ffe1ef295
commit
7b4fa4f4e7
|
@ -18,7 +18,6 @@ list(APPEND plat_main )
|
|||
option(DAEDALUS_DEBUG_CONSOLE "Enable Debug Console" ON)
|
||||
option(DAEDALUS_DEBUG_DISPLAYLIST "Options for debugging the display list, useful for determining texture issues" OFF)
|
||||
option(DAEDALUS_LOG "Enable various logging" ON)
|
||||
add_definitions("-g")
|
||||
add_compile_options("-Wall")
|
||||
else()
|
||||
add_compile_definitions(DAEDALUS_CONFIG_VERSION="Release") ## Perhaps we can remove this. It's only used in the PSP UI and model doesn't matter as much
|
||||
|
@ -41,6 +40,9 @@ list(APPEND plat_main )
|
|||
message("ARM Dynarec Enabled")
|
||||
option(DAEDALUS_ENABLE_DYNAREC "Enable Dynarec" ON)
|
||||
set(DYNAREC DynaRec) #Enable Dynarec Linker Flag
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
|
||||
message("x86_64 Dynarec Enabled")
|
||||
option(DAEDALUS_ENABLE_DYNAREC "Enable Dynarec" ON)
|
||||
else()
|
||||
message("Platform unknown, Dynarec disabled")
|
||||
option(DAEDALUS_ENABLE_DYNAREC "Enable Dynarec" OFF)
|
||||
|
@ -136,6 +138,7 @@ list(APPEND plat_main )
|
|||
if(NOT WIN32)
|
||||
add_compile_definitions(DAEDALUS_THREAD_CALL_TYPE=${})
|
||||
add_compile_definitions(DAEDALUS_VARARG_CALL_TYPE=${})
|
||||
add_compile_options("-g")
|
||||
endif()
|
||||
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ void Dump_Disassemble(u32 start, u32 end, const char * p_file_name)
|
|||
if (fp == NULL)
|
||||
return;
|
||||
|
||||
DBGConsole_Msg(0, "Disassembling from 0x%08x to 0x%08x ([C%s])", start, end, file_path);
|
||||
DBGConsole_Msg(0, "Disassembling from 0x%08x to 0x%08x ([C%s])", start, end, file_path.string().c_str());
|
||||
|
||||
const OpCode * op_start( reinterpret_cast< const OpCode * >( p_base ) );
|
||||
const OpCode * op_end( reinterpret_cast< const OpCode * >( p_base + (end-start) ) );
|
||||
|
@ -244,7 +244,7 @@ void Dump_RSPDisassemble(const char * p_file_name)
|
|||
// IO::Path::Assign(file_path, p_file_name);
|
||||
}
|
||||
|
||||
DBGConsole_Msg(0, "Disassembling from 0x%08x to 0x%08x ([C%s])", start, end, file_path);
|
||||
DBGConsole_Msg(0, "Disassembling from 0x%08x to 0x%08x ([C%s])", start, end, file_path.string().c_str());
|
||||
|
||||
FILE * fp( fopen(file_path.c_str(), "w") );
|
||||
if (fp == NULL)
|
||||
|
@ -288,7 +288,7 @@ void Dump_Strings( const char * p_file_name )
|
|||
// IO::Path::Assign(file_path, p_file_name);
|
||||
}
|
||||
|
||||
DBGConsole_Msg(0, "Dumping strings in rom ([C%s])", file_path);
|
||||
DBGConsole_Msg(0, "Dumping strings in rom ([C%s])", file_path.string().c_str());
|
||||
|
||||
// Overwrite here
|
||||
fp = fopen(file_path.c_str(), "w");
|
||||
|
|
|
@ -116,8 +116,8 @@ CFragment::CFragment(std::shared_ptr<CCodeBufferManager> p_manager, u32 entry_ad
|
|||
, mpIndirectExitMap( new CIndirectExitMap )
|
||||
#ifdef FRAGMENT_RETAIN_ADDITIONAL_INFO
|
||||
, mHitCount( 0 )
|
||||
, mTraceBuffer( nullptr )
|
||||
, mBranchBuffer( nullptr )
|
||||
, mTraceBuffer( TraceBuffer() )
|
||||
, mBranchBuffer( BranchBuffer() )
|
||||
, mExitAddress( 0 )
|
||||
#endif
|
||||
#ifdef FRAGMENT_SIMULATE_EXECUTION
|
||||
|
@ -910,7 +910,7 @@ const char * Sanitise( const char * str )
|
|||
return out.c_str();
|
||||
}
|
||||
|
||||
#if defined( DAEDALUS_W32 )
|
||||
#if defined( DAEDALUS_W32) || defined(DAEDALUS_POSIX)
|
||||
|
||||
extern char *disasmx86(u8 *opcode1,int codeoff1,int *len);
|
||||
void DisassembleBuffer( const u8 * buf, int buf_size, FILE * fh )
|
||||
|
@ -919,7 +919,7 @@ void DisassembleBuffer( const u8 * buf, int buf_size, FILE * fh )
|
|||
char *strbuf;
|
||||
int len = 0;
|
||||
|
||||
const u32 base_address( reinterpret_cast< u32 >( buf ) );
|
||||
//const u32 base_address( reinterpret_cast< u32 >( buf ) );
|
||||
|
||||
while ( pos < buf_size )
|
||||
{
|
||||
|
|
|
@ -100,11 +100,11 @@ CFragment * CFragmentCache::LookupFragment( u32 address ) const
|
|||
|
||||
// put in hash table
|
||||
mpCacheHashTable[ix].addr = address;
|
||||
mpCacheHashTable[ix].ptr = mpCachedFragment;
|
||||
mpCacheHashTable[ix].ptr = (uintptr_t)mpCachedFragment;
|
||||
}
|
||||
else
|
||||
{
|
||||
mpCachedFragment = mpCacheHashTable[ix].ptr;
|
||||
mpCachedFragment = (CFragment *)mpCacheHashTable[ix].ptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ void CFragmentCache::DumpStats( const std::filesystem::path outputdir ) const
|
|||
|
||||
std::sort( all_fragments.begin(), all_fragments.end(), SDescendingCyclesSort() );
|
||||
|
||||
std::filesystem::path filename "fragments.html";
|
||||
std::filesystem::path filename = "fragments.html";
|
||||
std::filesystem::path fragments_dir = "fragments";
|
||||
std::filesystem::exists(fragments_dir);
|
||||
fragments_dir /= filename;
|
||||
|
@ -432,7 +432,7 @@ void CFragmentCache::DumpStats( const std::filesystem::path outputdir ) const
|
|||
IO::Filename fragment_path;
|
||||
char fragment_name[ 32+1 ];
|
||||
snprintf( fragment_name, sizeof(fragment_name), "%08x.html", fragment->GetEntryAddress() );
|
||||
IO::Path::Combine( fragment_path, fragments_dir, fragment_name );
|
||||
IO::Path::Combine( fragment_path, fragments_dir.string().c_str(), fragment_name );
|
||||
|
||||
FILE * fragment_fh( fopen( fragment_path, "w" ) );
|
||||
if( fragment_fh != nullptr )
|
||||
|
|
|
@ -31,6 +31,7 @@ class CCodeBufferManager;
|
|||
#include <vector>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
|
||||
struct FHashT
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue