Fixed some valgrind warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@523 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0ba3948c42
commit
a56fcd4e98
|
@ -0,0 +1,175 @@
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:*
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
fun:dlopen
|
||||||
|
fun:g_module_open
|
||||||
|
obj:/usr/lib/libgtk-x11-2.0.so.0.1200.9
|
||||||
|
fun:g_type_module_use
|
||||||
|
fun:gtk_theme_engine_get
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
fun:dlopen
|
||||||
|
fun:g_module_open
|
||||||
|
obj:/usr/lib/libgtk-x11-2.0.so.0.1200.9
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
fun:dlopen
|
||||||
|
fun:g_module_open
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libdl-2.7.so
|
||||||
|
fun:dlsym
|
||||||
|
fun:g_module_symbol
|
||||||
|
fun:g_module_open
|
||||||
|
obj:/usr/lib/libgtk-x11-2.0.so.0.1200.9
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/ld-2.7.so
|
||||||
|
fun:__libc_dlopen_mode
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
obj:/lib/libc-2.7.so
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
fun:snd_pcm_direct_shm_create_or_connect
|
||||||
|
fun:snd_pcm_dmix_open
|
||||||
|
fun:_snd_pcm_dmix_open
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
fun:snd_pcm_open_named_slave
|
||||||
|
fun:_snd_pcm_softvol_open
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
fun:snd_pcm_open_named_slave
|
||||||
|
fun:_snd_pcm_plug_open
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
fun:snd_pcm_open_named_slave
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
fun:cgCreateProgram
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
obj:/usr/lib/libGLcore.so.169.12
|
||||||
|
obj:/usr/lib/libGLcore.so.169.12
|
||||||
|
fun:*
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
fun:snd_pcm_poll_descriptors_revents
|
||||||
|
fun:snd_pcm_wait_nocheck
|
||||||
|
fun:snd_pcm_write_areas
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
obj:*
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Addr8
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
fun:snd_pcm_wait_nocheck
|
||||||
|
fun:snd_pcm_write_areas
|
||||||
|
obj:/usr/lib/libasound.so.2.0.0
|
||||||
|
obj:*
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
fun:cgCreateProgram
|
||||||
|
fun:_ZN15PixelShaderMngr18CompilePixelShaderER14FRAGMENTSHADERPKc
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert a suppression name here>
|
||||||
|
Memcheck:Cond
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:/usr/lib/libCg.so
|
||||||
|
obj:*
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
valgrind --gen-suppressions=yes --suppressions=d.supp ./Dolphin $1 $2 $3
|
||||||
|
|
|
@ -165,6 +165,11 @@ void StringFromFormatV(std::string* out, const char* format, va_list args)
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
buf = new char[newSize + 1];
|
buf = new char[newSize + 1];
|
||||||
writtenCount = vsnprintf(buf, newSize, format, args);
|
writtenCount = vsnprintf(buf, newSize, format, args);
|
||||||
|
// ARGH! vsnprintf does no longer return -1 on truncation in newer libc!
|
||||||
|
// WORKAROUND! let's fake the old behaviour (even though it's less efficient).
|
||||||
|
// TODO: figure out why the fix causes an invalid read in strlen called from vsnprintf :(
|
||||||
|
if (writtenCount >= (int)newSize)
|
||||||
|
writtenCount = -1;
|
||||||
newSize *= 2;
|
newSize *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,14 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
|
||||||
cards[_card_index] = this;
|
cards[_card_index] = this;
|
||||||
et_this_card = CoreTiming::RegisterEvent(_rName.c_str(), FlushCallback);
|
et_this_card = CoreTiming::RegisterEvent(_rName.c_str(), FlushCallback);
|
||||||
|
|
||||||
|
interruptSwitch = 0;
|
||||||
|
m_bInterruptSet = 0;
|
||||||
|
command = 0;
|
||||||
|
status = MC_STATUS_BUSY | MC_STATUS_UNLOCKED | MC_STATUS_READY;
|
||||||
|
m_uPosition = 0;
|
||||||
|
memset(programming_buffer, 0, sizeof(programming_buffer));
|
||||||
|
formatDelay = 0;
|
||||||
|
|
||||||
nintendo_card_id = 0x00000010; // 16MBit nintendo card
|
nintendo_card_id = 0x00000010; // 16MBit nintendo card
|
||||||
card_id = 0xc221;
|
card_id = 0xc221;
|
||||||
/* nintendo_card_id = 0x00000510; // 16MBit "bigben" card
|
/* nintendo_card_id = 0x00000510; // 16MBit "bigben" card
|
||||||
|
@ -71,11 +79,6 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
|
||||||
Core::DisplayMessage(StringFromFormat("Wrote memory card contents to %s", m_strFilename.c_str()), 4000);
|
Core::DisplayMessage(StringFromFormat("Wrote memory card contents to %s", m_strFilename.c_str()), 4000);
|
||||||
}
|
}
|
||||||
|
|
||||||
formatDelay = 0;
|
|
||||||
interruptSwitch = 0;
|
|
||||||
m_bInterruptSet = 0;
|
|
||||||
|
|
||||||
status = MC_STATUS_BUSY | MC_STATUS_UNLOCKED | MC_STATUS_READY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEXIMemoryCard::Flush(bool exiting)
|
void CEXIMemoryCard::Flush(bool exiting)
|
||||||
|
|
|
@ -40,8 +40,6 @@
|
||||||
#include "../State.h"
|
#include "../State.h"
|
||||||
#include "../PowerPC/PPCAnalyst.h"
|
#include "../PowerPC/PPCAnalyst.h"
|
||||||
|
|
||||||
#define CURVERSION 0x0001
|
|
||||||
|
|
||||||
namespace HW
|
namespace HW
|
||||||
{
|
{
|
||||||
void Init()
|
void Init()
|
||||||
|
@ -49,7 +47,7 @@ namespace HW
|
||||||
CoreTiming::Init();
|
CoreTiming::Init();
|
||||||
PPCAnalyst::Init();
|
PPCAnalyst::Init();
|
||||||
|
|
||||||
Thunk_Init(); // not really hw, but this way we know it's inited first :P
|
Thunk_Init(); // not really hw, but this way we know it's inited early :P
|
||||||
State_Init();
|
State_Init();
|
||||||
|
|
||||||
// Init the whole Hardware
|
// Init the whole Hardware
|
||||||
|
|
|
@ -59,11 +59,22 @@ BEGIN_EVENT_TABLE(CCodeView, wxControl)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CCodeView::CCodeView(DebugInterface* debuginterface, wxWindow* parent, wxWindowID Id, const wxSize& Size)
|
CCodeView::CCodeView(DebugInterface* debuginterface, wxWindow* parent, wxWindowID Id, const wxSize& Size)
|
||||||
: wxControl(parent, Id, wxDefaultPosition, Size), debugger(debuginterface)
|
: wxControl(parent, Id, wxDefaultPosition, Size),
|
||||||
|
debugger(debuginterface),
|
||||||
|
rowHeight(13),
|
||||||
|
selection(0),
|
||||||
|
oldSelection(0),
|
||||||
|
selectionChanged(false),
|
||||||
|
selecting(false),
|
||||||
|
hasFocus(false),
|
||||||
|
showHex(false),
|
||||||
|
lx(-1),
|
||||||
|
ly(-1)
|
||||||
{
|
{
|
||||||
rowHeight = 13;
|
rowHeight = 13;
|
||||||
align = debuginterface->getInstructionSize(0);
|
align = debuginterface->getInstructionSize(0);
|
||||||
curAddress = debuginterface->getPC();
|
curAddress = debuginterface->getPC();
|
||||||
|
selection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,15 @@ EVT_MENU(-1, CMemoryView::OnPopupMenu)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CMemoryView::CMemoryView(DebugInterface* debuginterface, wxWindow* parent, wxWindowID Id, const wxSize& Size)
|
CMemoryView::CMemoryView(DebugInterface* debuginterface, wxWindow* parent, wxWindowID Id, const wxSize& Size)
|
||||||
: wxControl(parent, Id, wxDefaultPosition, Size), debugger(debuginterface)
|
: wxControl(parent, Id, wxDefaultPosition, Size),
|
||||||
|
debugger(debuginterface),
|
||||||
|
rowHeight(13),
|
||||||
|
selection(0),
|
||||||
|
oldSelection(0),
|
||||||
|
selectionChanged(false),
|
||||||
|
selecting(false),
|
||||||
|
hasFocus(false),
|
||||||
|
showHex(false)
|
||||||
{
|
{
|
||||||
rowHeight = 13;
|
rowHeight = 13;
|
||||||
align = debuginterface->getInstructionSize(0);
|
align = debuginterface->getInstructionSize(0);
|
||||||
|
|
Loading…
Reference in New Issue