aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-04-26 05:43:45 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-04-26 05:43:45 +0000
commit2f069f6f9e32135dae340745ea4fe57687cfd39b (patch)
tree3d1aa8475152bd90a0d0a7b038b515ef3c0d9274 /gdb
parentbec9537ec16637707bb38c0d85362d5eb021df01 (diff)
downloadgdb-2f069f6f9e32135dae340745ea4fe57687cfd39b.zip
gdb-2f069f6f9e32135dae340745ea4fe57687cfd39b.tar.gz
gdb-2f069f6f9e32135dae340745ea4fe57687cfd39b.tar.bz2
* breakpoint.c (condition_command, commands_from_control_command)
(break_command_really): Minor reformatting.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c81
2 files changed, 46 insertions, 40 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa31e44..e6107b6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-26 Joel Brobecker <brobecker@adacore.com>
+
+ * breakpoint.c (condition_command, commands_from_control_command)
+ (break_command_really): Minor reformatting.
+
2008-04-25 Pedro Alves <pedro@codesourcery.com>
* dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ad8ae2a..24ef7bf 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -601,44 +601,45 @@ condition_command (char *arg, int from_tty)
ALL_BREAKPOINTS (b)
if (b->number == bnum)
- {
- struct bp_location *loc = b->loc;
- for (; loc; loc = loc->next)
- {
- if (loc->cond)
- {
- xfree (loc->cond);
- loc->cond = 0;
- }
- }
- if (b->cond_string != NULL)
- xfree (b->cond_string);
+ {
+ struct bp_location *loc = b->loc;
+ for (; loc; loc = loc->next)
+ {
+ if (loc->cond)
+ {
+ xfree (loc->cond);
+ loc->cond = 0;
+ }
+ }
+ if (b->cond_string != NULL)
+ xfree (b->cond_string);
- if (*p == 0)
- {
- b->cond_string = NULL;
- if (from_tty)
- printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
- }
- else
- {
- arg = p;
- /* I don't know if it matters whether this is the string the user
- typed in or the decompiled expression. */
- b->cond_string = savestring (arg, strlen (arg));
- b->condition_not_parsed = 0;
- for (loc = b->loc; loc; loc = loc->next)
- {
- arg = p;
- loc->cond = parse_exp_1 (&arg, block_for_pc (loc->address), 0);
- if (*arg)
- error (_("Junk at end of expression"));
- }
- }
- breakpoints_changed ();
- breakpoint_modify_event (b->number);
- return;
- }
+ if (*p == 0)
+ {
+ b->cond_string = NULL;
+ if (from_tty)
+ printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
+ }
+ else
+ {
+ arg = p;
+ /* I don't know if it matters whether this is the string the user
+ typed in or the decompiled expression. */
+ b->cond_string = savestring (arg, strlen (arg));
+ b->condition_not_parsed = 0;
+ for (loc = b->loc; loc; loc = loc->next)
+ {
+ arg = p;
+ loc->cond =
+ parse_exp_1 (&arg, block_for_pc (loc->address), 0);
+ if (*arg)
+ error (_("Junk at end of expression"));
+ }
+ }
+ breakpoints_changed ();
+ breakpoint_modify_event (b->number);
+ return;
+ }
error (_("No breakpoint number %d."), bnum);
}
@@ -723,7 +724,7 @@ commands_from_control_command (char *arg, struct command_line *cmd)
breakpoints_changed ();
breakpoint_modify_event (b->number);
return simple_control;
- }
+ }
error (_("No breakpoint number %d."), bnum);
}
@@ -5565,7 +5566,7 @@ break_command_really (char *arg, char *cond_string, int thread,
breakpoint. */
if (!pending)
{
- if (parse_condition_and_thread)
+ if (parse_condition_and_thread)
{
/* Here we only parse 'arg' to separate condition
from thread number, so parsing in context of first
@@ -5577,7 +5578,7 @@ break_command_really (char *arg, char *cond_string, int thread,
if (cond_string)
make_cleanup (xfree, cond_string);
}
- else
+ else
{
/* Create a private copy of condition string. */
if (cond_string)