This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-8.2-branch] Darwin: fix bad loop incrementation


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6354b6519382f592c81932631c7d45c61d6ba5b7

commit 6354b6519382f592c81932631c7d45c61d6ba5b7
Author: Xavier Roirand <roirand@adacore.com>
Date:   Thu Aug 23 11:17:03 2018 -0400

    Darwin: fix bad loop incrementation
    
    When reading symbols from the vector of oso files on Mac OS X
    Darwin, a previous commit introduce a change in the loop and add
    an increment at each loop iteration whereas this incrementation is
    not needed since the increment or set of the loop control variable
    is already done in the loop.
    
    gdb/ChangeLog:
    
    	* machoread.c (macho_symfile_read_all_oso): Remove uneeded
    	incrementation.
    
    Change-Id: I3a5a6deb4e9d834ee7d4217a62d90c2ffb7241bc

Diff:
---
 gdb/ChangeLog   | 5 +++++
 gdb/machoread.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d169507..be849a9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-23  Xavier Roirand  <roirand@adacore.com>
+
+	* machoread.c (macho_symfile_read_all_oso): Remove uneeded
+	incrementation.
+
 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
 
 	* arch/aarch64.h (aarch64_regnum): Update comment.
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 07e1cda..62d0fb9 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -616,7 +616,7 @@ macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr,
   std::sort (oso_vector_ptr->begin (), oso_vector_ptr->end (),
 	     oso_el_compare_name);
 
-  for (ix = 0; ix < oso_vector_ptr->size (); ++ix)
+  for (ix = 0; ix < oso_vector_ptr->size ();)
     {
       int pfx_len;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]