summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRegia König2022-09-02 11:29:26 +0200
committerRegia König2022-09-02 11:29:26 +0200
commite7b7db1268cab0be88a22d52c27ce836729e81a8 (patch)
tree58eb5935dafb76ea169e806ab4b4352b1be4cfb2
parentAdd gdbscript for testing if relocation happens (diff)
downloadmemtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.tar.gz
memtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.tar.xz
memtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.zip
Move scripts for gdb
-rw-r--r--documentation/GDB commands6
-rw-r--r--test_code/gdbscripts/gdb_relocation_tests12
-rw-r--r--test_code/gdbscripts/gdbscript (renamed from test_code/gdbscript)0
-rw-r--r--test_code/gdbscripts/memtest_gdbscript (renamed from test_code/memtest_gdbscript)0
4 files changed, 18 insertions, 0 deletions
diff --git a/documentation/GDB commands b/documentation/GDB commands
index 14b793b..8411f19 100644
--- a/documentation/GDB commands
+++ b/documentation/GDB commands
@@ -127,6 +127,12 @@ VARIABLES
set x=4 or set variable x=4
whatis x -> type = double
+DISSASEMBLE BINARIES
+ gdb -batch -ex 'file /bin/ls' -ex 'disassemble main'
+ Also, -ex 'set disassembly-flavor intel' before other -exs will result in Intel assembly syntax
+
+ gcc -O0 -ggdb3 -std=c99 -Wall -Wextra -pedantic -o main.out main.c
+ gdb -batch -ex "disassemble/rs myfunc" main.out
diff --git a/test_code/gdbscripts/gdb_relocation_tests b/test_code/gdbscripts/gdb_relocation_tests
new file mode 100644
index 0000000..96b7226
--- /dev/null
+++ b/test_code/gdbscripts/gdb_relocation_tests
@@ -0,0 +1,12 @@
+add-symbol-file ../../memtest86plus_debug/build64/memtest.debug 0x201000
+
+b main
+b run_at
+b reloc
+b test_all_windows
+b main.c:407
+
+target remote localhost:1234
+layout src
+info b
+c
diff --git a/test_code/gdbscript b/test_code/gdbscripts/gdbscript
index f0d4a38..f0d4a38 100644
--- a/test_code/gdbscript
+++ b/test_code/gdbscripts/gdbscript
diff --git a/test_code/memtest_gdbscript b/test_code/gdbscripts/memtest_gdbscript
index 94a7f53..94a7f53 100644
--- a/test_code/memtest_gdbscript
+++ b/test_code/gdbscripts/memtest_gdbscript