diff options
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/scm-objfile.c | 11 | ||||
-rw-r--r-- | gdb/guile/scm-pretty-print.c | 25 |
2 files changed, 17 insertions, 19 deletions
diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c index b5f6172..79b784a 100644 --- a/gdb/guile/scm-objfile.c +++ b/gdb/guile/scm-objfile.c @@ -366,17 +366,16 @@ gdbscm_get_current_objfile (void) static SCM gdbscm_objfiles (void) { - struct objfile *objf; SCM result; result = SCM_EOL; - ALL_OBJFILES (objf) - { - SCM item = ofscm_scm_from_objfile (objf); + for (objfile *objf : all_objfiles (current_program_space)) + { + SCM item = ofscm_scm_from_objfile (objf); - result = scm_cons (item, result); - } + result = scm_cons (item, result); + } return scm_reverse_x (result, SCM_EOL); } diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c index 9cc4f7f..d621ed5 100644 --- a/gdb/guile/scm-pretty-print.c +++ b/gdb/guile/scm-pretty-print.c @@ -427,19 +427,18 @@ ppscm_search_pp_list (SCM list, SCM value) static SCM ppscm_find_pretty_printer_from_objfiles (SCM value) { - struct objfile *objfile; - - ALL_OBJFILES (objfile) - { - objfile_smob *o_smob = ofscm_objfile_smob_from_objfile (objfile); - SCM pp = ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob), - value); - - /* Note: This will return if pp is a <gdb:exception> object, - which is what we want. */ - if (gdbscm_is_true (pp)) - return pp; - } + for (objfile *objfile : all_objfiles (current_program_space)) + { + objfile_smob *o_smob = ofscm_objfile_smob_from_objfile (objfile); + SCM pp + = ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob), + value); + + /* Note: This will return if pp is a <gdb:exception> object, + which is what we want. */ + if (gdbscm_is_true (pp)) + return pp; + } return SCM_BOOL_F; } |