]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/guile/lib/gdb/printing.scm
Add progspace support for Guile.
[thirdparty/binutils-gdb.git] / gdb / guile / lib / gdb / printing.scm
index 29447025bda3655439e0c766ac334d51eaeb281a..eac94178cbdbb38ee6c36e3d4e2b0ec4831bc5b7 100644 (file)
@@ -19,8 +19,9 @@
 
 (define-module (gdb printing)
   #:use-module ((gdb) #:select
-               (*pretty-printers* pretty-printer? objfile?
-                objfile-pretty-printers set-objfile-pretty-printers!))
+               (*pretty-printers* pretty-printer? objfile? progspace?
+                objfile-pretty-printers set-objfile-pretty-printers!
+                progspace-pretty-printers set-progspace-pretty-printers!))
   #:use-module (gdb init))
 
 (define-public (prepend-pretty-printer! obj matcher)
@@ -31,9 +32,11 @@ If OBJ is #f, add MATCHER to the global list."
   (cond ((eq? obj #f)
         (set! *pretty-printers* (cons matcher *pretty-printers*)))
        ((objfile? obj)
-        (set-objfile-pretty-printers! obj
-                                      (cons matcher
-                                            (objfile-pretty-printers obj))))
+        (set-objfile-pretty-printers!
+         obj (cons matcher (objfile-pretty-printers obj))))
+       ((progspace? obj)
+        (set-progspace-pretty-printers!
+         obj (cons matcher (progspace-pretty-printers obj))))
        (else
         (%assert-type #f obj SCM_ARG1 'prepend-pretty-printer!))))
 
@@ -45,8 +48,10 @@ If OBJ is #f, add MATCHER to the global list."
   (cond ((eq? obj #f)
         (set! *pretty-printers* (append! *pretty-printers* (list matcher))))
        ((objfile? obj)
-        (set-objfile-pretty-printers! obj
-                                      (append! (objfile-pretty-printers obj)
-                                               (list matcher))))
+        (set-objfile-pretty-printers!
+         obj (append! (objfile-pretty-printers obj) (list matcher))))
+       ((progspace? obj)
+        (set-progspace-pretty-printers!
+         obj (append! (progspace-pretty-printers obj) (list matcher))))
        (else
         (%assert-type #f obj SCM_ARG1 'append-pretty-printer!))))