forked from Imagelibrary/binutils-gdb
Add progspace support for Guile.
* Makefile.in (SUBDIR_GUILE_OBS): Add scm-progspace.o. (SUBDIR_GUILE_SRCS): Add scm-progspace.c. (scm-progspace.o): New rule. * guile/guile-internal.h (pspace_smob): New typedef. (psscm_pspace_smob_pretty_printers): Declare. (psscm_pspace_smob_from_pspace): Declare. (psscm_scm_from_pspace): Declare. * guile/guile.c (initialize_gdb_module): Call gdbscm_initialize_pspaces. * guile/lib/gdb.scm: Export progspace symbols. * guile/lib/gdb/printing.scm (prepend-pretty-printer!): Add progspace support. (append-pretty-printer!): Ditto. * guile/scm-pretty-print.c (ppscm_find_pretty_printer_from_progspace): Implement. * guile/scm-progspace.c: New file. doc/ * guile.texi (Guile API): Add entry for Progspaces In Guile. (GDB Scheme Data Types): Mention <gdb:progspace> object. (Progspaces In Guile): New node. testsuite/ * gdb.guile/scm-pretty-print.exp: Add tests for objfile and progspace pretty-printer lookup. * gdb.guile/scm-pretty-print.scm (pp_s-printer): New function. (make-pp_s-printer): Call it. (make-pretty-printer-from-dict): New function. (lookup-pretty-printer-maker-from-dict): New function. (*pretty-printer*): Simplify. (make-objfile-pp_s-printer): New function. (install-objfile-pretty-printers!): New function. (make-progspace-pp_s-printer): New function. (install-progspace-pretty-printers!): New function. * gdb.guile/scm-progspace.c: New file. * gdb.guile/scm-progspace.exp: New file.
This commit is contained in:
@@ -441,7 +441,11 @@ ppscm_find_pretty_printer_from_objfiles (SCM value)
|
||||
static SCM
|
||||
ppscm_find_pretty_printer_from_progspace (SCM value)
|
||||
{
|
||||
return SCM_BOOL_F; /*TODO*/
|
||||
pspace_smob *p_smob = psscm_pspace_smob_from_pspace (current_program_space);
|
||||
SCM pp
|
||||
= ppscm_search_pp_list (psscm_pspace_smob_pretty_printers (p_smob), value);
|
||||
|
||||
return pp;
|
||||
}
|
||||
|
||||
/* Subroutine of find_pretty_printer to simplify it.
|
||||
|
||||
Reference in New Issue
Block a user