aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-01-12 01:10:55 +0000
committerAlan Modra <amodra@gmail.com>2010-01-12 01:10:55 +0000
commitcc761f759cdb2966648d33c92f85c6e6e3e5da82 (patch)
tree1be256d84ebfed2ca013cd004974e9fd4e93bc35
parent6496a6093db530ef4ab153eb510eeda17a7301c5 (diff)
downloadgdb-cc761f759cdb2966648d33c92f85c6e6e3e5da82.zip
gdb-cc761f759cdb2966648d33c92f85c6e6e3e5da82.tar.gz
gdb-cc761f759cdb2966648d33c92f85c6e6e3e5da82.tar.bz2
PR 11122
* listing.c (print_source): Add one to line number.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/listing.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8715b46..e93a30c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-12 Alan Modra <amodra@gmail.com>
+
+ PR 11122
+ * listing.c (print_source): Add one to line number.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
diff --git a/gas/listing.c b/gas/listing.c
index 93f2b37..9a71c76 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -1,6 +1,6 @@
/* listing.c - maintain assembly listings
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1047,7 +1047,7 @@ print_source (file_info_type * current_file,
cache = cached_lines + next_free_line;
cache->file = current_file;
- cache->line = current_file->linenum;
+ cache->line = current_file->linenum + 1;
cache->buffer[0] = 0;
p = buffer_line (current_file, cache->buffer, width);