From 9e9ad353c6225b36cc97e9216d9029a4ffae2446 Mon Sep 17 00:00:00 2001 From: mandlebro Date: Tue, 15 Jan 2019 21:37:02 +0000 Subject: [PATCH] Look for sym.main instead of main 'cause latter is not rebasing in PIEs --- src/widgets/DebugActions.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/DebugActions.cpp b/src/widgets/DebugActions.cpp index 0ad6eee3..cde2e177 100644 --- a/src/widgets/DebugActions.cpp +++ b/src/widgets/DebugActions.cpp @@ -158,7 +158,7 @@ DebugActions::DebugActions(QToolBar *toolBar, MainWindow *main) : void DebugActions::setButtonVisibleIfMainExists() { - int mainExists = Core()->cmd("f?main; ??").toInt(); + int mainExists = Core()->cmd("f?sym.main; ??").toInt(); // if main is not a flag we hide the continue until main button if (!mainExists) { actionContinueUntilMain->setVisible(false); @@ -168,7 +168,8 @@ void DebugActions::setButtonVisibleIfMainExists() void DebugActions::continueUntilMain() { - Core()->continueUntilDebug("main"); + QString mainAddr = Core()->cmd("?v sym.main"); + Core()->continueUntilDebug(mainAddr); } void DebugActions::attachProcessDialog()