From 399f313b12b98f268b6c95967d473dfd64c72df6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 9 Feb 2010 10:59:50 +0000 Subject: [PATCH] 2010-02-08 Tristan Gingold * objfiles.c (objfile_separate_debug_iterate): Do not iterate on brothers of the parent. --- gdb/ChangeLog | 5 +++++ gdb/objfiles.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0df0ae00a79..ceb22c0c946 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-02-09 Tristan Gingold + + * objfiles.c (objfile_separate_debug_iterate): Do not iterate on + brothers of the parent. + 2010-02-08 Tom Tromey PR c++/8017: diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 0b07e370916..489b81289f0 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -392,18 +392,21 @@ objfile_separate_debug_iterate (const struct objfile *parent, { struct objfile *res; + /* If any, return the first child. */ res = objfile->separate_debug_objfile; if (res) return res; - res = objfile->separate_debug_objfile_link; - if (res) - return res; - /* Common case where there is no separate debug objfile. */ if (objfile == parent) return NULL; + /* Return the brother if any. Note that we don't iterate on brothers of + the parents. */ + res = objfile->separate_debug_objfile_link; + if (res) + return res; + for (res = objfile->separate_debug_objfile_backlink; res != parent; res = res->separate_debug_objfile_backlink) -- 2.30.2