[PATCH v3 1/2] Fix the resizing condition of the line table

Bernd Edlinger bernd.edlinger@hotmail.de
Fri Mar 27 03:50:06 GMT 2020


That was wasting one element.

2020-03-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>
	* buildsym.c (record_line): Fix the resizing condition.
---
 gdb/buildsym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 7155db3..2d1e441 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -695,7 +695,7 @@ struct blockvector *
 	}
     }
 
-  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 *)
-- 
1.9.1


More information about the Gdb-patches mailing list