public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix the resizing condition of the line table
@ 2020-04-01 21:38 Bernd Edlinger
0 siblings, 0 replies; only message in thread
From: Bernd Edlinger @ 2020-04-01 21:38 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49
commit bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Thu Mar 12 11:52:34 2020 +0100
Fix the resizing condition of the line table
That was wasting one element.
2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
* buildsym.c (record_line): Fix the resizing condition.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/buildsym.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 12f099559b8..b94acffed66 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * buildsym.c (record_line): Fix the resizing condition.
+
2020-04-01 Tom Tromey <tom@tromey.com>
* value.h (value_literal_complex): Add comment.
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 7155db34b08..2d1e4419d83 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -695,7 +695,7 @@ buildsym_compunit::record_line (struct subfile *subfile, int line,
}
}
- if (subfile->line_vector->nitems + 1 >= subfile->line_vector_length)
+ if (subfile->line_vector->nitems >= subfile->line_vector_length)
{
subfile->line_vector_length *= 2;
subfile->line_vector = (struct linetable *)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-01 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 21:38 [binutils-gdb] Fix the resizing condition of the line table Bernd Edlinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).