summaryrefslogtreecommitdiff
path: root/tools/debug-debug.gdb
diff options
context:
space:
mode:
authorAJ Keresztes <aj@keresztes.us>2024-05-15 15:08:37 +0000
committerAJ Keresztes <aj@keresztes.us>2024-05-15 15:08:37 +0000
commit354c8402d3fcd830c1f2671aeaa0436963432efb (patch)
treedc1c9b78c75927cc83602a63f0e17916def434de /tools/debug-debug.gdb
parent66aa8daa855727ec925c3cbebba62b92fde4b204 (diff)
parentaaaf2321b8a0e47c46f8ba8a2090c423f5947cf9 (diff)
downloadtmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.gz
tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.bz2
tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.xz
tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.zip
Merge branch tmwa:master into master
Diffstat (limited to 'tools/debug-debug.gdb')
-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()