From 697bba1d4cb55ce8dee159a2be4a146ebd40879b Mon Sep 17 00:00:00 2001 From: Ernie Pasveer Date: Sun, 9 Apr 2023 12:01:10 -0500 Subject: [PATCH] Prepare for the v1.17 release cycle. --- CHANGELOG.md | 3 +++ debian/changelog | 2 +- src/CMakeLists.txt | 2 +- src/SeerMainWindow.cpp | 9 ++++++++ src/SeerUtl.cpp | 2 +- tests/helloexceptions/.gitignore | 2 ++ tests/helloexceptions/Makefile | 11 +++++++++ tests/helloexceptions/helloexceptions.cpp | 28 +++++++++++++++++++++++ 8 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 tests/helloexceptions/.gitignore create mode 100644 tests/helloexceptions/Makefile create mode 100644 tests/helloexceptions/helloexceptions.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index cbbb8ad..89104ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Seer Change Log +## [1.17beta] - 2023-??-?? +* Add a dialog when a breakpoint is reached. + ## [1.16] - 2023-04-07 * Add pid to main window and console title bars. * The Pending flag is automatically supplied to the breakpoint function in diff --git a/debian/changelog b/debian/changelog index d7aae67..df1b62c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -seergdb (1.16) UNRELEASED; urgency=medium +seergdb (1.17beta) UNRELEASED; urgency=medium * Updated release. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 785396e..2079d79 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1.0) -project(seergdb VERSION 1.16 LANGUAGES CXX) +project(seergdb VERSION 1.16.0 LANGUAGES CXX) set(PROJECT_NAME seergdb) diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index 037a764..4d7f5c6 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -884,6 +884,15 @@ void SeerMainWindow::handleText (const QString& text) { QMessageBox::warning(this, "Warning.", "Program encountered a '" + signalname_text + "' signal."); + }else if (reason_text == "breakpoint-hit") { + + QString bkptno_text = Seer::parseFirst(text, "bkptno=", '"', '"', false); + QString disp_text = Seer::parseFirst(text, "disp=", '"', '"', false); + + if (disp_text != "del") { + QMessageBox::information(this, "Note.", "Program reached breakpoint '" + bkptno_text + "'."); + } + }else if (reason_text == "watchpoint-trigger") { //*stopped,reason="watchpoint-trigger",wpt={number="3",exp="i"},value={old="32767",new="42"},frame={addr="0x0000000000400d79",func="function1",args=[{name="text",value="\"Hello, World!\""}],file="function1.cpp",fullname="/home/erniep/Development/Peak/src/Seer/helloworld/function1.cpp",line="9",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="0" diff --git a/src/SeerUtl.cpp b/src/SeerUtl.cpp index f3cf156..31d2ce6 100644 --- a/src/SeerUtl.cpp +++ b/src/SeerUtl.cpp @@ -8,7 +8,7 @@ // Increment this with every release on GitHub. // See scripts/change_versionnumber // -#define SEER_VERSION "1.16" +#define SEER_VERSION "1.17beta" namespace Seer { diff --git a/tests/helloexceptions/.gitignore b/tests/helloexceptions/.gitignore new file mode 100644 index 0000000..0e4895d --- /dev/null +++ b/tests/helloexceptions/.gitignore @@ -0,0 +1,2 @@ +helloexceptions +*.seer diff --git a/tests/helloexceptions/Makefile b/tests/helloexceptions/Makefile new file mode 100644 index 0000000..10a99cc --- /dev/null +++ b/tests/helloexceptions/Makefile @@ -0,0 +1,11 @@ +.PHONY: all + +all: helloexceptions + +helloexceptions: helloexceptions.cpp + g++ -g -o helloexceptions helloexceptions.cpp + +.PHONY: clean +clean: + rm -f helloexceptions helloexceptions.o + diff --git a/tests/helloexceptions/helloexceptions.cpp b/tests/helloexceptions/helloexceptions.cpp new file mode 100644 index 0000000..646e303 --- /dev/null +++ b/tests/helloexceptions/helloexceptions.cpp @@ -0,0 +1,28 @@ +#include +#include + +int AddPositiveIntegers (int a, int b) { + + if (a < 0 || b < 0) { + throw std::invalid_argument("AddPositiveIntegers arguments must be positive"); + } + + return a + b; +} + +int main() { + + try { + + std::cout << AddPositiveIntegers(-1, 2); //exception + + } catch (std::invalid_argument& e) { + + std::cerr << e.what() << std::endl; + + return -1; + } + + return 0; +} +