aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2011-12-01 10:37:06 +0000
committerAndrew Burgess <aburgess@broadcom.com>2011-12-01 10:37:06 +0000
commitfc0ae648aa229713c8c2f104dc413db8019ec899 (patch)
tree1fe928346cb413d7339297b2a11d96dc013491f2
parent28f68c73a40a1f0a4cdc290cba9168d51999029c (diff)
downloadgdb-fc0ae648aa229713c8c2f104dc413db8019ec899.zip
gdb-fc0ae648aa229713c8c2f104dc413db8019ec899.tar.gz
gdb-fc0ae648aa229713c8c2f104dc413db8019ec899.tar.bz2
http://sourceware.org/ml/gdb-patches/2011-11/msg00778.html
* source.c (print_source_lines_base): Fix missing braces on else clause leading to additional output.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/source.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dcaf777..8c83504 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-01 Andrew Burgess <aburgess@broadcom.com>
+
+ * source.c (print_source_lines_base): Fix missing braces on else
+ clause leading to additional output.
+
2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
* s390-nat.c (SUBOFF): Remove.
diff --git a/gdb/source.c b/gdb/source.c
index 77df541..e456ac0 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1322,10 +1322,12 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror)
print_sys_errmsg (name, errno);
}
else
- ui_out_field_int (uiout, "line", line);
- ui_out_text (uiout, "\tin ");
- ui_out_field_string (uiout, "file", s->filename);
- ui_out_text (uiout, "\n");
+ {
+ ui_out_field_int (uiout, "line", line);
+ ui_out_text (uiout, "\tin ");
+ ui_out_field_string (uiout, "file", s->filename);
+ ui_out_text (uiout, "\n");
+ }
return;
}