aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-09-19 21:51:32 +0000
committerJim Blandy <jimb@codesourcery.com>2003-09-19 21:51:32 +0000
commit1708f284ef5423ca0e3c9f92afa6c744f5627d2d (patch)
treed9375a829ba8f4c42a3b93f4568a4810180d2c76 /gdb
parent6729c0adbb71d7f5d53bac69d5d30ac11160b8e8 (diff)
downloadgdb-1708f284ef5423ca0e3c9f92afa6c744f5627d2d.zip
gdb-1708f284ef5423ca0e3c9f92afa6c744f5627d2d.tar.gz
gdb-1708f284ef5423ca0e3c9f92afa6c744f5627d2d.tar.bz2
* macrotab.c (macro_include): Use the correct comparison to find
the appropriate place for this inclusion in the list.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/macrotab.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6e58854..39d5a98 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2003-09-19 Andrew Cagney <cagney@redhat.com>
* config/pa/nm-hppah.h (NEED_TEXT_START_END): Delete.
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 4f0761d..56ee2a4 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -426,11 +426,10 @@ macro_include (struct macro_source_file *source,
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. */
+ 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 && line < (*link)->included_at_line;
+ *link && (*link)->included_at_line < line;
link = &(*link)->next_included)
;