Skip to content

Added the possibility to access pre-registers in a post-hook #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 6, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable caching
  • Loading branch information
Ayuto committed Feb 1, 2021
commit 3899c3a4e9ca9c1d86601cfde486591fd8a5239e
11 changes: 6 additions & 5 deletions src/core/modules/memory/memory_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ object CStackData::GetItem(unsigned int iIndex)
BOOST_RAISE_EXCEPTION(PyExc_IndexError, "Index out of range.")

// Argument already cached?
object retval = m_mapCache[iIndex];
if (retval)
return retval;
object retval;
//object retval = m_mapCache[iIndex];
//if (retval)
// return retval;

switch(m_pHook->m_pCallingConvention->m_vecArgTypes[iIndex])
{
Expand All @@ -196,7 +197,7 @@ object CStackData::GetItem(unsigned int iIndex)
case DATA_TYPE_STRING: retval = GetArgument<const char *>(m_pHook, iIndex); break;
default: BOOST_RAISE_EXCEPTION(PyExc_TypeError, "Unknown type.") break;
}
m_mapCache[iIndex] = retval;
//m_mapCache[iIndex] = retval;
return retval;
}

Expand All @@ -206,7 +207,7 @@ void CStackData::SetItem(unsigned int iIndex, object value)
BOOST_RAISE_EXCEPTION(PyExc_IndexError, "Index out of range.")

// Update cache
m_mapCache[iIndex] = value;
//m_mapCache[iIndex] = value;
switch(m_pHook->m_pCallingConvention->m_vecArgTypes[iIndex])
{
case DATA_TYPE_BOOL: SetArgument<bool>(m_pHook, iIndex, value); break;
Expand Down