This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: correctly place new inclusions in includer's list
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 19 Sep 2003 16:47:33 -0500
- Subject: PATCH: correctly place new inclusions in includer's list
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)
;