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] Fix misleading indentation error.


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

commit 7cbe16e99d8a61a168579354487902ee50413e08
Author: Stephen Roberts <stephen.roberts@arm.com>
Date:   Tue Mar 20 16:24:37 2018 +0000

    Fix misleading indentation error.
    
    This patch fixes a compile error introduced by my previous change, which
    caused the indentation of the following code block to become incorrect.
    
    ChangeLog:
    
    2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
    
            * gdb/symtab.c (find_pc_sect_line): fixed indentation.

Diff:
---
 gdb/ChangeLog |  4 ++++
 gdb/symtab.c  | 24 ++++++++++++------------
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 712e2d9..b95cbb0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
 
+	* gdb/symtab.c (find_pc_sect_line): fixed indentation.
+
+2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
+
 	* gdb/symtab.c (find_pc_sect_line): now uses binary search.
 
 2018-03-19  Tom Tromey  <tom@tromey.com>
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 41aaef7..2b1f955 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3212,17 +3212,17 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
       if (item->pc > pc && (!alt || item->pc < alt->pc))
 	alt = item;
 
-    auto pc_compare = [](const CORE_ADDR & pc,
-			const struct linetable_entry & lhs)->bool
-    {
-      return pc < lhs.pc;
-    };
+      auto pc_compare = [](const CORE_ADDR & pc,
+			   const struct linetable_entry & lhs)->bool
+      {
+	return pc < lhs.pc;
+      };
 
-    struct linetable_entry *first = item;
-    struct linetable_entry *last = item + len;
-    item = std::upper_bound (first, last, pc, pc_compare);
-    if (item != first)
-      prev = item - 1;		/* Found a matching item.  */
+      struct linetable_entry *first = item;
+      struct linetable_entry *last = item + len;
+      item = std::upper_bound (first, last, pc, pc_compare);
+      if (item != first)
+	prev = item - 1;		/* Found a matching item.  */
 
       /* At this point, prev points at the line whose start addr is <= pc, and
          item points at the next line.  If we ran off the end of the linetable
@@ -3245,10 +3245,10 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
 	}
 
       /* If another line (denoted by ITEM) is in the linetable and its
-         PC is after BEST's PC, but before the current BEST_END, then
+	 PC is after BEST's PC, but before the current BEST_END, then
 	 use ITEM's PC as the new best_end.  */
       if (best && item < last && item->pc > best->pc
-          && (best_end == 0 || best_end > item->pc))
+	  && (best_end == 0 || best_end > item->pc))
 	best_end = item->pc;
     }


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