mirror of https://github.com/PCSX2/pcsx2.git
newHostVM: Some Linux compilation fixes, warning removals.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4023 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
9a0a89aa13
commit
2ca8278c65
|
@ -17,6 +17,8 @@
|
|||
#include "../PrecompiledHeader.h"
|
||||
#include "PageFaultSource.h"
|
||||
|
||||
#include <wx/thread.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
@ -169,7 +171,7 @@ void HostSys::MmapResetPtr(void* base, size_t size)
|
|||
|
||||
pxAssertRel ((uptr)result != (uptr)base, pxsFmt(
|
||||
"Virtual memory decommit failed: memory at 0x%08X -> 0x%08X could not be remapped. "
|
||||
"This is likely caused by multi-thread memory contention.", base, base+size
|
||||
"This is likely caused by multi-thread memory contention.", base, (uptr)base+size
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ bool isoFile::tryIsoType(u32 _size, s32 _offset, s32 _blockofs)
|
|||
bool isoFile::Detect( bool readType )
|
||||
{
|
||||
char buf[32];
|
||||
int len = m_filename.Length();
|
||||
|
||||
m_type = ISOTYPE_ILLEGAL;
|
||||
|
||||
|
|
|
@ -92,7 +92,6 @@ static vtlbHandler
|
|||
null_handler,
|
||||
|
||||
tlb_fallback_0,
|
||||
tlb_fallback_1,
|
||||
tlb_fallback_2,
|
||||
tlb_fallback_3,
|
||||
tlb_fallback_4,
|
||||
|
|
|
@ -1278,7 +1278,7 @@ void SysCorePlugins::Init( PluginsEnum_t pid )
|
|||
if( !m_info[pid] || m_info[pid]->IsInitialized ) return;
|
||||
|
||||
Console.Indent().WriteLn( "Init %s", tbl_PluginInfo[pid].shortname );
|
||||
if( NULL != m_info[pid]->CommonBindings.Init() )
|
||||
if( 0 != m_info[pid]->CommonBindings.Init() )
|
||||
throw Exception::PluginInitError( pid );
|
||||
|
||||
m_info[pid]->IsInitialized = true;
|
||||
|
|
|
@ -19,89 +19,87 @@
|
|||
|
||||
#include <wx/stackwalk.h>
|
||||
|
||||
class StackDump : public wxStackWalker
|
||||
{
|
||||
protected:
|
||||
wxString m_stackTrace;
|
||||
wxString m_srcFuncName;
|
||||
bool m_ignoreDone;
|
||||
int m_skipped;
|
||||
|
||||
public:
|
||||
StackDump( const FnChar_t* src_function_name )
|
||||
{
|
||||
if( src_function_name != NULL )
|
||||
m_srcFuncName = fromUTF8(src_function_name);
|
||||
|
||||
m_ignoreDone = false;
|
||||
m_skipped = 0;
|
||||
}
|
||||
|
||||
const wxString& GetStackTrace() const { return m_stackTrace; }
|
||||
|
||||
protected:
|
||||
virtual void OnStackFrame(const wxStackFrame& frame)
|
||||
{
|
||||
wxString name( frame.GetName() );
|
||||
if( name.IsEmpty() )
|
||||
{
|
||||
name = wxsFormat( L"%p ", frame.GetAddress() );
|
||||
}
|
||||
/*else if( m_srcFuncName.IsEmpty() || m_srcFuncName == name )
|
||||
{
|
||||
// FIXME: This logic isn't reliable yet.
|
||||
// It's possible for our debug information to not match the function names returned by
|
||||
// __pxFUNCTION__ (might happen in linux a lot, and could happen in win32 due to
|
||||
// inlining on Dev aserts). The better approach is a system the queues up all the
|
||||
// stacktrace info in individual wxStrings, and does a two-pass check -- first pass
|
||||
// for the function name and, if not found, a second pass that just skips the first
|
||||
// few stack entries.
|
||||
|
||||
// It's important we only walk the stack once because Linux (argh, always linux!) has
|
||||
// a really god aweful slow stack walker.
|
||||
|
||||
// I'm not doing it right now because I've worked on this mess enough for one week. --air
|
||||
|
||||
m_ignoreDone = true;
|
||||
}
|
||||
|
||||
if( !m_ignoreDone )
|
||||
{
|
||||
m_skipped++;
|
||||
return;
|
||||
}*/
|
||||
|
||||
//wxString briefName;
|
||||
wxString essenName;
|
||||
|
||||
if( frame.HasSourceLocation() )
|
||||
{
|
||||
wxFileName wxfn(frame.GetFileName());
|
||||
//briefName.Printf( L"(%s:%d)", wxfn.GetFullName().c_str(), frame.GetLine() );
|
||||
|
||||
wxfn.SetVolume( wxEmptyString );
|
||||
//int count = wxfn.GetDirCount();
|
||||
for( int i=0; i<2; ++i )
|
||||
wxfn.RemoveDir(0);
|
||||
|
||||
essenName.Printf( L"%s:%d", wxfn.GetFullPath().c_str(), frame.GetLine() );
|
||||
}
|
||||
|
||||
m_stackTrace += pxsFmt( L"[%02d] %-44s %s\n",
|
||||
frame.GetLevel()-m_skipped,
|
||||
name.c_str(),
|
||||
essenName.c_str()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static wxString pxGetStackTrace( const FnChar_t* calledFrom )
|
||||
{
|
||||
wxString stackTrace;
|
||||
|
||||
class StackDump : public wxStackWalker
|
||||
{
|
||||
protected:
|
||||
wxString m_stackTrace;
|
||||
wxString m_srcFuncName;
|
||||
bool m_ignoreDone;
|
||||
int m_skipped;
|
||||
|
||||
public:
|
||||
StackDump( const FnChar_t* src_function_name )
|
||||
{
|
||||
if( src_function_name != NULL )
|
||||
m_srcFuncName = fromUTF8(src_function_name);
|
||||
|
||||
m_ignoreDone = false;
|
||||
m_skipped = 0;
|
||||
}
|
||||
|
||||
const wxString& GetStackTrace() const { return m_stackTrace; }
|
||||
|
||||
protected:
|
||||
virtual void OnStackFrame(const wxStackFrame& frame)
|
||||
{
|
||||
wxString name( frame.GetName() );
|
||||
if( name.IsEmpty() )
|
||||
{
|
||||
name = wxsFormat( L"%p ", frame.GetAddress() );
|
||||
}
|
||||
/*else if( m_srcFuncName.IsEmpty() || m_srcFuncName == name )
|
||||
{
|
||||
// FIXME: This logic isn't reliable yet.
|
||||
// It's possible for our debug information to not match the function names returned by
|
||||
// __pxFUNCTION__ (might happen in linux a lot, and could happen in win32 due to
|
||||
// inlining on Dev aserts). The better approach is a system the queues up all the
|
||||
// stacktrace info in individual wxStrings, and does a two-pass check -- first pass
|
||||
// for the function name and, if not found, a second pass that just skips the first
|
||||
// few stack entries.
|
||||
|
||||
// It's important we only walk the stack once because Linux (argh, always linux!) has
|
||||
// a really god aweful slow stack walker.
|
||||
|
||||
// I'm not doing it right now because I've worked on this mess enough for one week. --air
|
||||
|
||||
m_ignoreDone = true;
|
||||
}
|
||||
|
||||
if( !m_ignoreDone )
|
||||
{
|
||||
m_skipped++;
|
||||
return;
|
||||
}*/
|
||||
|
||||
//wxString briefName;
|
||||
wxString essenName;
|
||||
|
||||
if( frame.HasSourceLocation() )
|
||||
{
|
||||
wxFileName wxfn(frame.GetFileName());
|
||||
//briefName.Printf( L"(%s:%d)", wxfn.GetFullName().c_str(), frame.GetLine() );
|
||||
|
||||
wxfn.SetVolume( wxEmptyString );
|
||||
int count = wxfn.GetDirCount();
|
||||
for( int i=0; i<2; ++i )
|
||||
wxfn.RemoveDir(0);
|
||||
|
||||
essenName.Printf( L"%s:%d", wxfn.GetFullPath().c_str(), frame.GetLine() );
|
||||
}
|
||||
|
||||
m_stackTrace += wxString::Format( L"[%02d] %-44s %s\n",
|
||||
frame.GetLevel()-m_skipped,
|
||||
name.c_str(),
|
||||
essenName.c_str()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
StackDump dump( calledFrom );
|
||||
dump.Walk( 3 );
|
||||
return dump.GetStackTrace();
|
||||
StackDump dump( calledFrom );
|
||||
dump.Walk( 3 );
|
||||
return dump.GetStackTrace();
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "COP0.h"
|
||||
#include "R5900Exceptions.h"
|
||||
|
||||
#include "Utilities\MemsetFast.inl"
|
||||
#include "Utilities/MemsetFast.inl"
|
||||
|
||||
using namespace R5900;
|
||||
using namespace vtlb_private;
|
||||
|
|
Loading…
Reference in New Issue