https://github.com/DavidSpickett closed
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/bulbazord approved this pull request.
LGTM. I didn't realize lldb-server didn't use libXML, learned something new
today. :)
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -9,10 +9,16 @@
#ifndef LLDB_TARGET_REGISTERFLAGS_H
#define LLDB_TARGET_REGISTERFLAGS_H
-#include "lldb/Utility/Log.h"
+#include
+#include
+#include
+#include
clayborg wrote:
Sorry, I hadn't expanded the full file to see being used in code that
@@ -9,10 +9,16 @@
#ifndef LLDB_TARGET_REGISTERFLAGS_H
#define LLDB_TARGET_REGISTERFLAGS_H
-#include "lldb/Utility/Log.h"
+#include
DavidSpickett wrote:
Moved the assert into the cpp file and removed the include in the header.
@@ -9,10 +9,16 @@
#ifndef LLDB_TARGET_REGISTERFLAGS_H
#define LLDB_TARGET_REGISTERFLAGS_H
-#include "lldb/Utility/Log.h"
+#include
+#include
+#include
+#include
DavidSpickett wrote:
string and vector are needed, presumably because RegisterFlags is a leaf
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/69951
>From 5c8b9538e1e5646f19d5bb40ab19afaf2c68e804 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Mon, 9 Oct 2023 10:33:08 +0100
Subject: [PATCH 1/6] [lldb][lldb-server] Enable sending registerflags as
@@ -9,10 +9,16 @@
#ifndef LLDB_TARGET_REGISTERFLAGS_H
#define LLDB_TARGET_REGISTERFLAGS_H
-#include "lldb/Utility/Log.h"
+#include
clayborg wrote:
Not needed in this header, move to .cpp if needed there?
https://github.com/llvm/llvm-project/pull/69951
@@ -9,10 +9,16 @@
#ifndef LLDB_TARGET_REGISTERFLAGS_H
#define LLDB_TARGET_REGISTERFLAGS_H
-#include "lldb/Utility/Log.h"
+#include
+#include
+#include
+#include
clayborg wrote:
Not needed in this header, move to .cpp if needed there?
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/69951
>From 5c8b9538e1e5646f19d5bb40ab19afaf2c68e804 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Mon, 9 Oct 2023 10:33:08 +0100
Subject: [PATCH 1/5] [lldb][lldb-server] Enable sending registerflags as
@@ -10,6 +10,7 @@
#define LLDB_TARGET_REGISTERFLAGS_H
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
DavidSpickett wrote:
Done.
https://github.com/llvm/llvm-project/pull/69951
___
@@ -3113,6 +3119,10 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() {
if (!format.empty())
response << "format=\"" << format << "\" ";
+if (reg_info->flags_type) {
+ response << "type=\"" << reg_info->flags_type->GetID() << "\" ";
+}
@@ -175,3 +175,35 @@ std::string RegisterFlags::AsTable(uint32_t max_width)
const {
return table;
}
+
+void RegisterFlags::ToXML(StreamString ) const {
+ // Example XML:
+ //
+ //
+ //
+ strm.Indent();
+ strm << "";
+ for (const Field : m_fields) {
+//
https://github.com/DavidSpickett updated
https://github.com/llvm/llvm-project/pull/69951
>From 5c8b9538e1e5646f19d5bb40ab19afaf2c68e804 Mon Sep 17 00:00:00 2001
From: David Spickett
Date: Mon, 9 Oct 2023 10:33:08 +0100
Subject: [PATCH 1/4] [lldb][lldb-server] Enable sending registerflags as
https://github.com/DavidSpickett edited
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
DavidSpickett wrote:
> It's somewhat implied, but is the goal to (continue to) avoid that
> dependency? Other parts of LLDB do rely on libxml2 but I can see how you'd
> want to limit the dependencies of lldb-server.
Yeah I agree with how lldb-server does it now, and don't want to change that.
JDevlieghere wrote:
> And if you're not familiar with lldb-server and XML, as I wasn't, it doesn't
> use libXML to generate it. That's why I'm building strings to fit with the
> existing target.xml code.
It's somewhat implied, but is the goal to (continue to) avoid that dependency?
Other
@@ -10,6 +10,7 @@
#define LLDB_TARGET_REGISTERFLAGS_H
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
clayborg wrote:
We can just forward declare StreamString, and possibly remove Log.h above as
well if we want to.
@@ -175,3 +175,35 @@ std::string RegisterFlags::AsTable(uint32_t max_width)
const {
return table;
}
+
+void RegisterFlags::ToXML(StreamString ) const {
+ // Example XML:
+ //
+ //
+ //
+ strm.Indent();
+ strm << "";
+ for (const Field : m_fields) {
+//
@@ -3113,6 +3119,10 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() {
if (!format.empty())
response << "format=\"" << format << "\" ";
+if (reg_info->flags_type) {
+ response << "type=\"" << reg_info->flags_type->GetID() << "\" ";
+}
DavidSpickett wrote:
And if you're not familiar with lldb-server and XML, as I wasn't, it doesn't
use libXML to generate it. That's why I'm building strings to fit with the
existing target.xml code.
https://github.com/llvm/llvm-project/pull/69951
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: David Spickett (DavidSpickett)
Changes
This adds ToXML methods to encode RegisterFlags and its fields into XML
according to GDB's target XML format:
DavidSpickett wrote:
For
https://discourse.llvm.org/t/rfc-adding-register-field-information-to-lldb-server/74143.
May be helpful to look at
https://github.com/DavidSpickett/llvm-project/commit/93bdc630f6a4d27c4849b756838c5d70d23e2e90
which will be the next PR and adds the first register
https://github.com/DavidSpickett edited
https://github.com/llvm/llvm-project/pull/69951
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/DavidSpickett created
https://github.com/llvm/llvm-project/pull/69951
This adds ToXML methods to encode RegisterFlags and its fields into XML
according to GDB's target XML format:
26 matches
Mail list logo