Yu-hsin Wang has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/54124 )

Change subject: arch-arm: gdb support Thumb-2 ISA
......................................................................

arch-arm: gdb support Thumb-2 ISA

From the document*1, we should allow 2,3,4 in kind check function for
supporting all kinds of ARM breakpoint.

1. https://sourceware.org/gdb/current/onlinedocs/gdb/ARM-Breakpoint-Kinds.html

Change-Id: I82bcb88cfe6e80e7f17cd6bb68a26a45ace7b174
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54124
Reviewed-by: Giacomo Travaglini <[email protected]>
Maintainer: Giacomo Travaglini <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/remote_gdb.cc
1 file changed, 40 insertions(+), 2 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/remote_gdb.cc b/src/arch/arm/remote_gdb.cc
index 215c532..6e8923e 100644
--- a/src/arch/arm/remote_gdb.cc
+++ b/src/arch/arm/remote_gdb.cc
@@ -168,6 +168,20 @@

 using namespace ArmISA;

+namespace
+{
+
+// https://sourceware.org/gdb/current/onlinedocs/gdb/ARM-Breakpoint-Kinds.html
+enum class ArmBpKind
+{
+    THUMB = 2,
+    THUMB_2 = 3,
+    ARM = 4,
+};
+
+} // namespace
+
+
 static bool
 tryTranslate(ThreadContext *tc, Addr addr)
 {
@@ -364,8 +378,14 @@
 bool
 RemoteGDB::checkBpKind(size_t kind)
 {
-    // 2 for Thumb ISA, 4 for ARM ISA.
-    return kind == 2 || kind == 4;
+    switch (ArmBpKind(kind)) {
+      case ArmBpKind::THUMB:
+      case ArmBpKind::THUMB_2:
+      case ArmBpKind::ARM:
+        return true;
+      default:
+        return false;
+    }
 }

 } // namespace gem5

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/54124
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I82bcb88cfe6e80e7f17cd6bb68a26a45ace7b174
Gerrit-Change-Number: 54124
Gerrit-PatchSet: 5
Gerrit-Owner: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Philip Metzler <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to