[testsuite][AArch64] Port gdb.trace
authorPierre Langlois <pierre.langlois@arm.com>
Thu, 9 Jul 2015 15:35:11 +0000 (16:35 +0100)
committerPierre Langlois <pierre.langlois@arm.com>
Thu, 9 Jul 2015 15:35:11 +0000 (16:35 +0100)
This patch adds support for AArch64 to the gdb.trace testsuite.

Note that it does not add support for testing fast tracepoint as it
isn't supported.  Therefore the test cases with inline assembly are not
ported in this patch, as we do not know what the conditions for
inserting a fast tracepoint on AArch64 would be.

gdb/testsuite/ChangeLog:

* gdb.trace/backtrace.exp: Set registers for aarch64 target.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/mi-trace-frame-collected.exp: Likewise.
* gdb.trace/mi-trace-unavailable.exp: Likewise.
* gdb.trace/report.exp: Likewise.
* gdb.trace/trace-break.exp: Likewise.
* gdb.trace/unavailable.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.

gdb/ChangeLog
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
gdb/testsuite/gdb.trace/mi-trace-unavailable.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/unavailable.exp
gdb/testsuite/gdb.trace/while-dyn.exp

index b68b60d1dd8d4e2853f6afb55cd8b83a2f5a25d2..6a5fe22873fc99151028e35d59edae3943c431c6 100644 (file)
@@ -1,3 +1,14 @@
+2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
+
+       * gdb.trace/backtrace.exp: Set registers for aarch64 target.
+       * gdb.trace/collection.exp: Likewise.
+       * gdb.trace/mi-trace-frame-collected.exp: Likewise.
+       * gdb.trace/mi-trace-unavailable.exp: Likewise.
+       * gdb.trace/report.exp: Likewise.
+       * gdb.trace/trace-break.exp: Likewise.
+       * gdb.trace/unavailable.exp: Likewise.
+       * gdb.trace/while-dyn.exp: Likewise.
+
 2015-07-09  Pierre Langlois  <pierre.langlois@arm.com>
 
        * aarch64-tdep.c: Add ax.h and ax-gdb.h includes.
index 045778edc6f9f2b503dda47c3955be17f6a0bc94..f69089b7e5a69ea039e6f492d6bf4faa7f7332a9 100644 (file)
@@ -146,6 +146,9 @@ if [is_amd64_regs_target] {
 } elseif [is_x86_like_target] {
     set fpreg "\$ebp"
     set spreg "\$esp"
+} elseif [is_aarch64_target] {
+    set fpreg "\$x29"
+    set spreg "\$sp"
 } else {
     set fpreg "\$fp"
     set spreg "\$sp"
index bd42cface2a1cc01b3e3d41fb26924dea4df002c..69ad6ee66d4e47bc78bd7a6d7f7da6f0dc911a39 100644 (file)
@@ -44,6 +44,10 @@ if [is_amd64_regs_target] {
     set fpreg "ebp"
     set spreg "esp"
     set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set fpreg "x29"
+    set spreg "sp"
+    set pcreg "pc"
 } else {
     set fpreg "fp"
     set spreg "sp"
index 51ed4790b06e35bd49b23c672f7f2eeed5c75a4f..a7bed0bc36416598e773d4ee3b79966c1193086f 100644 (file)
@@ -56,6 +56,8 @@ if [is_amd64_regs_target] {
     set pcreg "rip"
 } elseif [is_x86_like_target] {
     set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set pcreg "pc"
 } else {
     # Other ports that support tracepoints should set the name of pc
     # register here.
index 6b97d9d899decee2c8eecfbaa83d9c479fbcb12a..ea9cddd41a33c3cd8e23e8e69582b4c000895b4e 100644 (file)
@@ -135,6 +135,8 @@ proc test_trace_unavailable { data_source } {
            set pcnum 16
        } elseif [is_x86_like_target] {
            set pcnum 8
+       } elseif [is_aarch64_target] {
+           set pcnum 32
        } else {
            # Other ports support tracepoint should define the number
            # of its own pc register.
index 2fa676b61708d09aa1e92b9477cf72ab55e81ad3..b3e90002c70124041b6fc9387b17b3dc908ab45f 100644 (file)
@@ -158,6 +158,10 @@ if [is_amd64_regs_target] {
     set fpreg "ebp"
     set spreg "esp"
     set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set fpreg "x29"
+    set spreg "sp"
+    set pcreg "pc"
 } else {
     set fpreg "fp"
     set spreg "sp"
index 4283ca62073b4dbc9d4c7e202fa828e22546895a..1f576011968b497f1f4f7aa3bd299753780247ee 100644 (file)
@@ -49,6 +49,8 @@ if [is_amd64_regs_target] {
     set fpreg "ebp"
     set spreg "esp"
     set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set fpreg "x29"
 }
 
 # Set breakpoint and tracepoint at the same address.
index 5be970448b8bfdde40197ccde5b49870c646f135..910c1dd5de2cd2b80c1f0ff23a93e161fa48af04 100644 (file)
@@ -34,6 +34,10 @@ if [is_amd64_regs_target] {
     set fpreg "ebp"
     set spreg "esp"
     set pcreg "eip"
+} elseif [is_aarch64_target] {
+    set fpreg "x29"
+    set spreg "sp"
+    set pcreg "pc"
 } else {
     set fpreg "fp"
     set spreg "sp"
index 198421eaec97e3b40bce64fd9e321e89f828b5ab..fe4535ec0ef5e88ffa8fe798cd0fa5e45332d14c 100644 (file)
@@ -47,6 +47,8 @@ if [is_amd64_regs_target] {
     set fpreg "\$rbp"
 } elseif [is_x86_like_target] {
     set fpreg "\$ebp"
+} elseif [is_aarch64_target] {
+    set fpreg "\$x29"
 } else {
     set fpreg "\$fp"
 }