Skip to content

Commit

Permalink
Merge pull request #12690 from JosJuice/no-getpointer-part-3
Browse files Browse the repository at this point in the history
IOS::HLE::BluetoothEmuDevice: Remove calls to GetPointer
  • Loading branch information
AdmiralCurtiss committed Apr 9, 2024
2 parents 629935e + f40dc7b commit e77def0
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 139 deletions.
6 changes: 5 additions & 1 deletion Source/Core/Core/Debugger/Debugger_SymbolMap.cpp
Expand Up @@ -13,6 +13,7 @@
#include "Common/StringUtil.h"

#include "Core/Core.h"
#include "Core/HW/Memmap.h"
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PPCSymbolDB.h"
#include "Core/PowerPC/PowerPC.h"
Expand Down Expand Up @@ -119,8 +120,11 @@ void PrintCallstack(const Core::CPUThreadGuard& guard, Common::Log::LogType type
});
}

void PrintDataBuffer(Common::Log::LogType type, const u8* data, size_t size, std::string_view title)
void PrintDataBuffer(const Core::System& system, Common::Log::LogType type, u32 address, u32 size,
std::string_view title)
{
const u8* data = system.GetMemory().GetPointerForRange(address, size);

GENERIC_LOG_FMT(type, Common::Log::LogLevel::LDEBUG, "{}", title);
for (u32 j = 0; j < size;)
{
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/Core/Debugger/Debugger_SymbolMap.h
Expand Up @@ -13,7 +13,8 @@
namespace Core
{
class CPUThreadGuard;
}
class System;
} // namespace Core

namespace Dolphin_Debugger
{
Expand All @@ -26,6 +27,6 @@ struct CallstackEntry
bool GetCallstack(const Core::CPUThreadGuard& guard, std::vector<CallstackEntry>& output);
void PrintCallstack(const Core::CPUThreadGuard& guard, Common::Log::LogType type,
Common::Log::LogLevel level);
void PrintDataBuffer(Common::Log::LogType type, const u8* data, size_t size,
void PrintDataBuffer(const Core::System& system, Common::Log::LogType type, u32 address, u32 size,
std::string_view title);
} // namespace Dolphin_Debugger

0 comments on commit e77def0

Please sign in to comment.