Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ agent_t::agent_t (amd_dbgapi_agent_id_t agent_id, process_t &process,
: handle_object (agent_id), m_os_agent_info (os_agent_info),
m_architecture (architecture), m_process (process),
m_memory_cache (
*this,
[this] (agent_address_t address, void *read, const void *write,
size_t size)
{
Expand Down Expand Up @@ -107,7 +108,7 @@ agent_t::agent_t (amd_dbgapi_agent_id_t agent_id, process_t &process,

agent_t::~agent_t ()
{
/* Drop all active cache lines. */
/* Drop all active cache entries. */
m_memory_cache.write_back ();
m_memory_cache.discard ();
}
Expand Down
6 changes: 3 additions & 3 deletions src/agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class agent_t : public detail::handle_object<amd_dbgapi_agent_id_t>
const architecture_t *const m_architecture;
process_t &m_process;

mutable memory_cache_t<agent_address_t> m_memory_cache;
mutable memory_cache_t m_memory_cache;

public:
agent_t (amd_dbgapi_agent_id_t agent_id, process_t &process,
Expand Down Expand Up @@ -99,14 +99,14 @@ class agent_t : public detail::handle_object<amd_dbgapi_agent_id_t>
void *buffer,
size_t size) const
{
return m_memory_cache.read_global_memory (address, buffer, size);
return m_memory_cache.read_agent_memory (address, buffer, size);
}

[[nodiscard]] size_t write_agent_memory_partial (agent_address_t address,
const void *buffer,
size_t size) const
{
return m_memory_cache.write_global_memory (address, buffer, size);
return m_memory_cache.write_agent_memory (address, buffer, size);
}

template <typename T>
Expand Down
Loading