Boris Shingarov has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/30897 )

Change subject: base: DPRINTF which XML we are sending to GDB
......................................................................

base: DPRINTF which XML we are sending to GDB

For some reason which I am still puzzled over, this function can return
the wrong XML descriptor (i.e. aarch64 in a 32-bit context); to aid in
tracing what's going on, I have added DPRINTFs to easily see which XML
we are returning.  Surprisingly, lifting the ternary to if, seems to
also result in returning the correct value.

Change-Id: I9d5e8df7c4e04759866f2abadfebdae814a94896
---
M src/arch/arm/remote_gdb.cc
1 file changed, 8 insertions(+), 1 deletion(-)



diff --git a/src/arch/arm/remote_gdb.cc b/src/arch/arm/remote_gdb.cc
index b2977e5..d026e1d 100644
--- a/src/arch/arm/remote_gdb.cc
+++ b/src/arch/arm/remote_gdb.cc
@@ -343,7 +343,14 @@
         GDB_XML("aarch64-fpu.xml", gdb_xml_aarch64_fpu),
     };
 #undef GDB_XML
-    auto& annexMap = inAArch64(context()) ? annexMap64 : annexMap32;
+    std::map<std::string, std::string> annexMap;
+    if (inAArch64(context())) {
+        DPRINTF(GDBAcc, "GDB XML: aarch64\n");
+        annexMap = annexMap64;
+    } else {
+        DPRINTF(GDBAcc, "GDB XML: arm32\n");
+        annexMap = annexMap32;
+    }
     auto it = annexMap.find(annex);
     if (it == annexMap.end())
         return false;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/30897
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: I9d5e8df7c4e04759866f2abadfebdae814a94896
Gerrit-Change-Number: 30897
Gerrit-PatchSet: 1
Gerrit-Owner: Boris Shingarov <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
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