Skip to content
Merged
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
12 changes: 7 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ env:
BUILD_TYPE: Debug

jobs:
build_ubuntu_20:
runs-on: ubuntu-20.04
build_ubuntu_24:
runs-on: ubuntu-24.04
strategy:
matrix:
QT_VERSION: [5.12.8, 5.15.2]
steps:
- name: Install Dependencies
run: sudo apt-get install -y libcapstone-dev libgraphviz-dev
Expand All @@ -22,9 +25,9 @@ jobs:
submodules: true

- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: "5.12.8"
version: ${{matrix.QT_VERSION}}

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand All @@ -34,7 +37,6 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --parallel 4 --config ${{env.BUILD_TYPE}}

# Disabled until both aqinstall and install-qt-action support the fixes…
# build_windows:
# runs-on: windows-latest
Expand Down
21 changes: 5 additions & 16 deletions src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include "Configuration.h"
#include "IBreakpoint.h"
#include "edb.h"

#include <QCoreApplication>
Expand All @@ -20,17 +21,6 @@

namespace {

QDataStream &operator<<(QDataStream &s, const IBreakpoint::TypeId &id) {
return s << static_cast<int>(id);
}

QDataStream &operator>>(QDataStream &s, IBreakpoint::TypeId &id) {
int value = 0;
s >> value;
id = static_cast<IBreakpoint::TypeId>(value);
return s;
}

//------------------------------------------------------------------------------
// Name: getDefaultPluginPath
// Desc: return default path for plugins
Expand Down Expand Up @@ -81,12 +71,10 @@ void Configuration::sendChangeNotification() {
//------------------------------------------------------------------------------
void Configuration::readSettings() {

qRegisterMetaTypeStreamOperators<IBreakpoint::TypeId>("IBreakpoint::TypeId");

#ifdef Q_OS_WIN32
const QString default_font = QFont("Courier New", 8).toString();
#elif defined(Q_OS_MACX)
const QString default_font = QFont("Courier New", 10).toString();
const QString default_font = QFont("Courier New", 10).toString();
#else
const QString default_font = QFont("Monospace", 8).toString();
#endif
Expand Down Expand Up @@ -126,7 +114,8 @@ void Configuration::readSettings() {
disableASLR = settings.value("debugger.disableASLR.enabled", false).toBool();
disableLazyBinding = settings.value("debugger.disableLazyBinding.enabled", false).toBool();
break_on_library_load = settings.value("debugger.break_on_library_load_event.enabled", false).toBool();
default_breakpoint_type = settings.value("debugger.default_breakpoint_type", QVariant::fromValue(IBreakpoint::TypeId::Automatic)).value<IBreakpoint::TypeId>();
default_breakpoint_type = static_cast<IBreakpoint::TypeId>(settings.value("debugger.default_breakpoint_type", static_cast<int>(IBreakpoint::TypeId::Automatic)).value<int>());

settings.endGroup();

settings.beginGroup("Disassembly");
Expand Down Expand Up @@ -242,7 +231,7 @@ void Configuration::writeSettings() {
settings.setValue("debugger.disableASLR.enabled", disableASLR);
settings.setValue("debugger.disableLazyBinding.enabled", disableLazyBinding);
settings.setValue("debugger.break_on_library_load_event.enabled", break_on_library_load);
settings.setValue("debugger.default_breakpoint_type", QVariant::fromValue(default_breakpoint_type));
settings.setValue("debugger.default_breakpoint_type", static_cast<int>(default_breakpoint_type));
settings.endGroup();

settings.beginGroup("Disassembly");
Expand Down