summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-06-14 13:43:09 +0300
committerHanoh Haim <hhaim@cisco.com>2016-06-14 13:43:09 +0300
commit661d54e1fa7c946757204ce364eb2e5312c5487f (patch)
tree1f1ca9e1895abde08f3c62dc15b0641188742e63
parent5c659501dd4edad74b0763f656bdf3a12c905153 (diff)
add some gdb scripts
-rw-r--r--scripts/gdb_script.txt3
-rw-r--r--scripts/gdb_script1.txt16
-rw-r--r--scripts/t-rex-64-debug-gdb-bt12
-rw-r--r--scripts/t-rex-64-debug-gdb-core12
4 files changed, 43 insertions, 0 deletions
diff --git a/scripts/gdb_script.txt b/scripts/gdb_script.txt
new file mode 100644
index 00000000..d6a7d22c
--- /dev/null
+++ b/scripts/gdb_script.txt
@@ -0,0 +1,3 @@
+run
+bt full
+
diff --git a/scripts/gdb_script1.txt b/scripts/gdb_script1.txt
new file mode 100644
index 00000000..b6854743
--- /dev/null
+++ b/scripts/gdb_script1.txt
@@ -0,0 +1,16 @@
+run
+set logging overwrite on
+set logging file gdb.bt
+set logging on
+set pagination off
+echo backtrace
+bt
+bt full
+gcore
+info registers
+set logging off
+quit
+
+
+
+
diff --git a/scripts/t-rex-64-debug-gdb-bt b/scripts/t-rex-64-debug-gdb-bt
new file mode 100644
index 00000000..2d64ce62
--- /dev/null
+++ b/scripts/t-rex-64-debug-gdb-bt
@@ -0,0 +1,12 @@
+#! /bin/bash
+export LD_LIBRARY_PATH=`pwd`
+/bin/gdb --batch --command=gdb_script1.txt --args ./_t-rex-64-debug $@
+RESULT=$?
+
+if [ $RESULT -ne 0 ]; then
+ exit $RESULT
+fi
+
+
+
+
diff --git a/scripts/t-rex-64-debug-gdb-core b/scripts/t-rex-64-debug-gdb-core
new file mode 100644
index 00000000..cc790448
--- /dev/null
+++ b/scripts/t-rex-64-debug-gdb-core
@@ -0,0 +1,12 @@
+#! /bin/bash
+export LD_LIBRARY_PATH=`pwd`
+/bin/gdb ./_t-rex-64-debug $@
+RESULT=$?
+
+if [ $RESULT -ne 0 ]; then
+ exit $RESULT
+fi
+
+
+
+