summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-01-28 13:52:38 +0100
committerFedja Beader <fedja@protonmail.ch>2024-03-18 21:01:49 +0100
commit6071d37c4127aafef84ba1144ac1055972426116 (patch)
treeeb3de83167bac06bc0ad301fc70cd50fa06ef4b8
parent581490f804832b479abda46a52cefd4218cbf910 (diff)
downloadtmwa-6071d37c4127aafef84ba1144ac1055972426116.tar.gz
tmwa-6071d37c4127aafef84ba1144ac1055972426116.tar.bz2
tmwa-6071d37c4127aafef84ba1144ac1055972426116.tar.xz
tmwa-6071d37c4127aafef84ba1144ac1055972426116.zip
Workaround "Function... not defined in.." (breakpoints not found) (GDB bug)
Function "_Z13do_breakpointIN4tmwa3map11script_dataEEvRKT_PKc" not defined in "/builds/specing/tmwa/src/debug-debug/map-script-persist.cpp". Breakpoint 1 (/builds/specing/tmwa/src/debug-debug/map-script-persist.cpp:'_Z13do_breakpointIN4tmwa3map11script_dataEEvRKT_PKc') pending. void do_breakpoint<tmwa::map::script_data>(tmwa::map::script_data const&, char const*); Thanks to ssbssa@#gdb for pointing this out.
-rw-r--r--tools/debug-debug.gdb15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/debug-debug.gdb b/tools/debug-debug.gdb
index 2e59437..b50a49b 100644
--- a/tools/debug-debug.gdb
+++ b/tools/debug-debug.gdb
@@ -42,8 +42,21 @@ set print frame-arguments none
set python print-stack full
set logging on
-rbreak do_breakpoint
+# Workaround "Function... not defined in.." (breakpoints not found) (GDB bug)
+# https://sourceware.org/bugzilla/show_bug.cgi?id=15962
+# In some gdb versions rbreak works, in some break does.
+# This code should work for any.
+python
+bpoint = gdb.Breakpoint("do_breakpoint")
+
+if bpoint.pending:
+ print("`break ...` found no breakpoints, trying `rbreak ...`")
+ bpoint.delete()
+ gdb.execute("rbreak do_breakpoint")
+
+end
set logging off
+
commands
silent
python hit_breakpoint()