Skip to content

Commit

Permalink
DebugTools: Fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoticgd committed Aug 28, 2024
1 parent 48de49b commit 6dc158c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
2 changes: 0 additions & 2 deletions pcsx2-qt/Debugger/Models/BreakpointModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ QVariant BreakpointModel::headerData(int section, Qt::Orientation orientation, i

Qt::ItemFlags BreakpointModel::flags(const QModelIndex& index) const
{
volatile const int row = index.row();

switch (index.column())
{
case BreakpointColumns::CONDITION:
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/DebugTools/DebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ std::optional<u32> DebugInterface::getStackFrameSize(const ccc::Function& functi
u32 instruction = read32(function.address().value);

if ((instruction & 0xffff0000) == 0x27bd0000)
stack_frame_size = -(instruction & 0xffff);
stack_frame_size = -(s16)(instruction & 0xffff);

if (stack_frame_size < 0)
return std::nullopt;
Expand Down
17 changes: 2 additions & 15 deletions pcsx2/DebugTools/SymbolGuardian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "SymbolGuardian.h"

#include <demangle.h>
#include <ccc/ast.h>
#include <ccc/elf.h>
#include <ccc/importer_flags.h>
Expand All @@ -19,6 +18,8 @@
#include "Host.h"
#include "VMManager.h"

#include <demangle.h>

SymbolGuardian R5900SymbolGuardian;
SymbolGuardian R3000SymbolGuardian;

Expand Down Expand Up @@ -124,20 +125,6 @@ void SymbolGuardian::Reset()
});
}

static void CreateBuiltInDataType(
ccc::SymbolDatabase& database, ccc::SymbolSourceHandle source, const char* name, ccc::ast::BuiltInClass bclass)
{
ccc::Result<ccc::DataType*> symbol = database.data_types.create_symbol(name, source, nullptr);
if (!symbol.success())
return;

std::unique_ptr<ccc::ast::BuiltIn> type = std::make_unique<ccc::ast::BuiltIn>();
type->name = name;
type->size_bytes = ccc::ast::builtin_class_size(bclass);
type->bclass = bclass;
(*symbol)->set_type(std::move(type));
}

void SymbolGuardian::ImportElf(std::vector<u8> elf, std::string elf_file_name, const std::string& nocash_path)
{
ccc::Result<ccc::ElfFile> parsed_elf = ccc::ElfFile::parse(std::move(elf));
Expand Down
4 changes: 0 additions & 4 deletions pcsx2/DebugTools/SymbolGuardian.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#pragma once

#include <queue>
#include <atomic>
#include <thread>
#include <functional>
Expand Down Expand Up @@ -103,9 +102,6 @@ struct SymbolGuardian

std::thread m_import_thread;
std::atomic_bool m_interrupt_import_thread = false;

std::queue<ccc::SymbolDatabase> m_load_queue;
std::mutex m_load_queue_lock;
};

extern SymbolGuardian R5900SymbolGuardian;
Expand Down

0 comments on commit 6dc158c

Please sign in to comment.