Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: correctly place new inclusions in includer's list
@ 2003-09-19 21:50 Jim Blandy
  2003-09-22 18:00 ` Jim Blandy
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Blandy @ 2003-09-19 21:50 UTC (permalink / raw)
  To: gdb-patches


D'oh.

2003-09-19  Jim Blandy  <jimb@redhat.com>

	* macrotab.c (macro_include): Use the correct comparison to find
	the appropriate place for this inclusion in the list.

Index: gdb/macrotab.c
===================================================================
RCS file: /cvs/src/src/gdb/macrotab.c,v
retrieving revision 1.8
diff -c -r1.8 macrotab.c
*** gdb/macrotab.c	8 Jun 2003 18:27:14 -0000	1.8
--- gdb/macrotab.c	19 Sep 2003 21:39:51 -0000
***************
*** 426,436 ****
    struct macro_source_file **link;
  
    /* Find the right position in SOURCE's `includes' list for the new
!      file.  Scan until we find the first file we shouldn't follow ---
!      which is therefore the file we should directly precede --- or
!      reach the end of the list.  */
    for (link = &source->includes;
!        *link && line < (*link)->included_at_line;
         link = &(*link)->next_included)
      ;
  
--- 426,435 ----
    struct macro_source_file **link;
  
    /* Find the right position in SOURCE's `includes' list for the new
!      file.  Skip inclusions at earlier lines, until we find one at the
!      same line or later --- or until the end of the list.  */
    for (link = &source->includes;
!        *link && (*link)->included_at_line < line;
         link = &(*link)->next_included)
      ;
  


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-19 21:50 PATCH: correctly place new inclusions in includer's list Jim Blandy
@ 2003-09-22 18:00 ` Jim Blandy
  2003-09-22 18:06   ` David Carlton
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Blandy @ 2003-09-22 18:00 UTC (permalink / raw)
  To: gdb-patches


I think this would be good to include on the 6.0 branch; would that be okay?

Jim Blandy <jimb@redhat.com> writes:

> D'oh.
> 
> 2003-09-19  Jim Blandy  <jimb@redhat.com>
> 
> 	* macrotab.c (macro_include): Use the correct comparison to find
> 	the appropriate place for this inclusion in the list.
> 
> Index: gdb/macrotab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/macrotab.c,v
> retrieving revision 1.8
> diff -c -r1.8 macrotab.c
> *** gdb/macrotab.c	8 Jun 2003 18:27:14 -0000	1.8
> --- gdb/macrotab.c	19 Sep 2003 21:39:51 -0000
> ***************
> *** 426,436 ****
>     struct macro_source_file **link;
>   
>     /* Find the right position in SOURCE's `includes' list for the new
> !      file.  Scan until we find the first file we shouldn't follow ---
> !      which is therefore the file we should directly precede --- or
> !      reach the end of the list.  */
>     for (link = &source->includes;
> !        *link && line < (*link)->included_at_line;
>          link = &(*link)->next_included)
>       ;
>   
> --- 426,435 ----
>     struct macro_source_file **link;
>   
>     /* Find the right position in SOURCE's `includes' list for the new
> !      file.  Skip inclusions at earlier lines, until we find one at the
> !      same line or later --- or until the end of the list.  */
>     for (link = &source->includes;
> !        *link && (*link)->included_at_line < line;
>          link = &(*link)->next_included)
>       ;
>   


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-22 18:00 ` Jim Blandy
@ 2003-09-22 18:06   ` David Carlton
  2003-09-22 18:28     ` Andrew Cagney
  2003-09-22 19:42     ` Jim Blandy
  0 siblings, 2 replies; 7+ messages in thread
From: David Carlton @ 2003-09-22 18:06 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

On 22 Sep 2003 12:57:29 -0500, Jim Blandy <jimb@redhat.com> said:

> I think this would be good to include on the 6.0 branch; would that
> be okay?

I've seen macrotab seg faults intermittently over the last few months;
I've been too lazy to track them down (they're hard to reproduce, and
I didn't know if it was something weird about my branch or a bug in
mainline), but if this patch might fix them, and if it's as trivial as
it seems, then putting it in 6.0 makes sense to me.

David Carlton
carlton@kealia.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-22 18:06   ` David Carlton
@ 2003-09-22 18:28     ` Andrew Cagney
  2003-09-22 22:28       ` Jim Blandy
  2003-09-22 19:42     ` Jim Blandy
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2003-09-22 18:28 UTC (permalink / raw)
  To: David Carlton, Jim Blandy; +Cc: gdb-patches

> On 22 Sep 2003 12:57:29 -0500, Jim Blandy <jimb@redhat.com> said:
> 
> 
>> I think this would be good to include on the 6.0 branch; would that
>> be okay?
> 
> 
> I've seen macrotab seg faults intermittently over the last few months;
> I've been too lazy to track them down (they're hard to reproduce, and
> I didn't know if it was something weird about my branch or a bug in
> mainline), but if this patch might fix them, and if it's as trivial as
> it seems, then putting it in 6.0 makes sense to me.

Ok.  Testcase on mainline?

Andrew



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-22 18:06   ` David Carlton
  2003-09-22 18:28     ` Andrew Cagney
@ 2003-09-22 19:42     ` Jim Blandy
  2003-09-22 20:11       ` David Carlton
  1 sibling, 1 reply; 7+ messages in thread
From: Jim Blandy @ 2003-09-22 19:42 UTC (permalink / raw)
  To: David Carlton; +Cc: gdb-patches

David Carlton <carlton@kealia.com> writes:

> On 22 Sep 2003 12:57:29 -0500, Jim Blandy <jimb@redhat.com> said:
> 
> > I think this would be good to include on the 6.0 branch; would that
> > be okay?
> 
> I've seen macrotab seg faults intermittently over the last few months;
> I've been too lazy to track them down (they're hard to reproduce, and
> I didn't know if it was something weird about my branch or a bug in
> mainline), but if this patch might fix them, and if it's as trivial as
> it seems, then putting it in 6.0 makes sense to me.

It's hard to see how this would fix any seg faults.  It just fixes
where in the list the traversal stops; but no matter where it stops,
the other loop conditions ensure that it stops in a structurally valid
state.

So I'd say the segfaults you've seen don't weigh for or against.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-22 19:42     ` Jim Blandy
@ 2003-09-22 20:11       ` David Carlton
  0 siblings, 0 replies; 7+ messages in thread
From: David Carlton @ 2003-09-22 20:11 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

On 22 Sep 2003 14:39:08 -0500, Jim Blandy <jimb@redhat.com> said:
> David Carlton <carlton@kealia.com> writes:

>> I've seen macrotab seg faults intermittently over the last few
>> months; I've been too lazy to track them down (they're hard to
>> reproduce, and I didn't know if it was something weird about my
>> branch or a bug in mainline), but if this patch might fix them, and
>> if it's as trivial as it seems, then putting it in 6.0 makes sense
>> to me.

> It's hard to see how this would fix any seg faults.  It just fixes
> where in the list the traversal stops; but no matter where it stops,
> the other loop conditions ensure that it stops in a structurally
> valid state.

> So I'd say the segfaults you've seen don't weigh for or against.

Oh well.  I'll keep my eye out for them (I haven't seen one in a
little while) and see if I can find a way to reproduce them regularly
(or fix them?), then.

David Carlton
carlton@kealia.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: correctly place new inclusions in includer's list
  2003-09-22 18:28     ` Andrew Cagney
@ 2003-09-22 22:28       ` Jim Blandy
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2003-09-22 22:28 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: David Carlton, gdb-patches

Andrew Cagney <ac131313@redhat.com> writes:

> > On 22 Sep 2003 12:57:29 -0500, Jim Blandy <jimb@redhat.com> said:
> >
> >> I think this would be good to include on the 6.0 branch; would that
> >> be okay?
> > I've seen macrotab seg faults intermittently over the last few
> > months;
> > I've been too lazy to track them down (they're hard to reproduce, and
> > I didn't know if it was something weird about my branch or a bug in
> > mainline), but if this patch might fix them, and if it's as trivial as
> > it seems, then putting it in 6.0 makes sense to me.
> 
> Ok.  Testcase on mainline?

(Are you asking David about tests for his segfaults, or me about tests
for the bug my patch fixes?  Assuming the latter...)

No... let me see if I can whip one up.  It would have to be
GCC-specific, since we need to use certain GCC-specific flags to
produce debug info that used to bring about the internal error.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-22 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-19 21:50 PATCH: correctly place new inclusions in includer's list Jim Blandy
2003-09-22 18:00 ` Jim Blandy
2003-09-22 18:06   ` David Carlton
2003-09-22 18:28     ` Andrew Cagney
2003-09-22 22:28       ` Jim Blandy
2003-09-22 19:42     ` Jim Blandy
2003-09-22 20:11       ` David Carlton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox