* [RFA] Fix objfile_separate_debug_iterate
@ 2010-02-08 14:16 Tristan Gingold
2010-02-08 16:45 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2010-02-08 14:16 UTC (permalink / raw)
To: gdb-patches ml
Hi,
this patch fixes a thinko that triggers when an objfile:
* has no separate objfile
* has 'brother' objfiles.
(This can happen currently only with Mach-O).
No regressions on GNU/Linux i386.
Tristan.
2010-02-08 Tristan Gingold <gingold@adacore.com>
* objfiles.c (objfile_separate_debug_iterate): Do not iterate on
brothers of the parent.
---
gdb/objfiles.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 0b07e37..489b812 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 (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)
--
1.6.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix objfile_separate_debug_iterate
2010-02-08 14:16 [RFA] Fix objfile_separate_debug_iterate Tristan Gingold
@ 2010-02-08 16:45 ` Tom Tromey
2010-02-09 11:00 ` Tristan Gingold
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2010-02-08 16:45 UTC (permalink / raw)
To: Tristan Gingold; +Cc: gdb-patches ml
>>>>> "Tristan" == Tristan Gingold <gingold@adacore.com> writes:
Tristan> 2010-02-08 Tristan Gingold <gingold@adacore.com>
Tristan> * objfiles.c (objfile_separate_debug_iterate): Do not iterate on
Tristan> brothers of the parent.
Ok, thanks.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix objfile_separate_debug_iterate
2010-02-08 16:45 ` Tom Tromey
@ 2010-02-09 11:00 ` Tristan Gingold
0 siblings, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2010-02-09 11:00 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches ml
On Feb 8, 2010, at 5:43 PM, Tom Tromey wrote:
>>>>>> "Tristan" == Tristan Gingold <gingold@adacore.com> writes:
>
> Tristan> 2010-02-08 Tristan Gingold <gingold@adacore.com>
> Tristan> * objfiles.c (objfile_separate_debug_iterate): Do not iterate on
> Tristan> brothers of the parent.
>
> Ok, thanks.
Thanks, committed.
Tristan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-09 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 14:16 [RFA] Fix objfile_separate_debug_iterate Tristan Gingold
2010-02-08 16:45 ` Tom Tromey
2010-02-09 11:00 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox