aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 5f61b73..d9cf548 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -501,9 +501,7 @@ objfpy_build_id_matches (const struct bfd_build_id *build_id,
static struct objfile *
objfpy_lookup_objfile_by_name (const char *name)
{
- struct objfile *objfile;
-
- ALL_OBJFILES (objfile)
+ for (objfile *objfile : all_objfiles (current_program_space))
{
const char *filename;
@@ -529,9 +527,7 @@ objfpy_lookup_objfile_by_name (const char *name)
static struct objfile *
objfpy_lookup_objfile_by_build_id (const char *build_id)
{
- struct objfile *objfile;
-
- ALL_OBJFILES (objfile)
+ for (objfile *objfile : all_objfiles (current_program_space))
{
const struct bfd_build_id *obfd_build_id;