diff --git a/.gitignore b/.gitignore index 1dcc061..cb8d2ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ dist build Session.vim +compile_commands.json diff --git a/Makefile b/Makefile index 9e45dc9..64e9ba7 100644 --- a/Makefile +++ b/Makefile @@ -55,28 +55,28 @@ shell: release: ${ENV_RUN} rm -rf build/${HOST_ENV}-release - ${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} release + ${ENV_RUN} ./scripts/setup-build ${HOST_ENV} release debug: ${ENV_RUN} rm -rf build/${HOST_ENV}-debug - ${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} debug + ${ENV_RUN} ./scripts/setup-build ${HOST_ENV} debug asan: ${ENV_RUN} rm -rf build/${HOST_ENV}-asan - ${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} asan + ${ENV_RUN} ./scripts/setup-build ${HOST_ENV} asan windows: ${ENV_RUN} rm -rf build/windows - ${ENV_RUN} ./scripts/setup-build.ps1 windows + ${ENV_RUN} ./scripts/setup-build windows windows-debug: ${ENV_RUN} rm -rf build/windows - ${ENV_RUN} ./scripts/setup-build.ps1 windows debug + ${ENV_RUN} ./scripts/setup-build windows debug gba: ${ENV_RUN} rm -rf build/gba-release - ${ENV_RUN} ./scripts/setup-build.ps1 gba release + ${ENV_RUN} ./scripts/setup-build gba release gba-debug: ${ENV_RUN} rm -rf build/gba-debug - ${ENV_RUN} ./scripts/setup-build.ps1 gba debug + ${ENV_RUN} ./scripts/setup-build gba debug diff --git a/scripts/setup-build.ps1 b/scripts/setup-build.ps1 deleted file mode 100755 index 3ef3f43..0000000 --- a/scripts/setup-build.ps1 +++ /dev/null @@ -1,51 +0,0 @@ -#! /usr/bin/env pwsh - -Param( - [parameter(Mandatory=$true,Position=0)][String] ${target}, - [parameter(Mandatory=$true,Position=1)][String] ${buildType} -) - -$project=(Get-Location).Path - -if (${target} -eq "windows") { - $toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake" -} elseif (${target} -eq "gba") { - $toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake" - $oxUseStdLib="-DOX_USE_STDLIB=OFF" -} - -if (${buildType} -eq "asan") { - $buildTypeArgs="-DUSE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug" -} elseif (${buildType} -eq "debug") { - $buildTypeArgs="-DCMAKE_BUILD_TYPE=Debug" -} elseif (${buildType} -eq "release") { - $buildTypeArgs="-DCMAKE_BUILD_TYPE=Release" -} - -if (${env:QTDIR} -ne "") { - $qtPath="-DQTDIR=${env:QTDIR}" -} - -$buildDir="${project}/build/${target}-${buildType}" -$distDir="${project}/dist/${target}-${buildType}" - -New-Item -ItemType Directory -Path $buildDir | Out-Null -Push-Location $buildDir -cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ` - -DCMAKE_INSTALL_PREFIX="$distDir" ` - -G Ninja ` - $buildTool ` - $nostalgiaBuildType ` - $oxUseStdLib ` - $buildTypeArgs ` - $qtPath ` - $toolchain ` - $project -Pop-Location - -rm -f build/current dist/current -if (!(Test-Path -Path dist)) { - New-Item -ItemType Directory -Path dist | Out-Null -} -ln -s ${target}-${buildType} build/current -ln -s ${target}-${buildType} dist/current diff --git a/src/callstackmodel.cpp b/src/callstackmodel.cpp index 2d58f0a..8e73be9 100644 --- a/src/callstackmodel.cpp +++ b/src/callstackmodel.cpp @@ -48,6 +48,17 @@ QVariant CallStackModel::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { const auto &f = m_frames[index.row()]; + switch (index.column()) { + case Column::Function: + return f.function; + case Column::Source: + return QString("%1:%2").arg(f.file).arg(f.line); + default: + return {}; + } + } else if (role == Qt::ToolTipRole) { + const auto &f = m_frames[index.row()]; + switch (index.column()) { case Column::Function: return f.function;