]> git.eshelyaron.com Git - emacs.git/commitdiff
LLDB: print packages with xprint
authorGerd Möllmann <gerd@gnu.org>
Sat, 12 Aug 2023 09:07:17 +0000 (11:07 +0200)
committerGerd Möllmann <gerd@gnu.org>
Sat, 12 Aug 2023 09:11:02 +0000 (11:11 +0200)
etc/emacs_lldb.py

index c6cc6225234fca7d6b6b9e2cfdaac70f25c02f09..120282f5335314de86a3f866637e76e698c94fd0 100644 (file)
@@ -182,6 +182,10 @@ class Lisp_Object:
                 return name.get_string_data()
         return None
 
+    def get_package_name(self):
+        name = Lisp_Object(self.value.GetValueForExpressionPath("->name"))
+        return name.get_string_data()
+
     # Return a summary string for this object.
     def summary(self):
         return str(self.value)
@@ -192,6 +196,8 @@ class Lisp_Object:
             result.AppendMessage(f"name:    {self.get_symbol_name()}")
         elif self.lisp_type == "Lisp_String":
             result.AppendMessage(str(self.get_string_data()))
+        elif self.lisp_type == "Lisp_Vectorlike" and self.pvec_type == "PVEC_PACKAGE":
+            result.AppendMessage(f"package {self.get_package_name()}")
         else:
             result.AppendMessage(self.summary())