diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2007-11-30 10:00:26 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2007-11-30 10:00:26 +0000 |
commit | e236ba4424253599ed1f75a522c863d2afc8cd03 (patch) | |
tree | c9759cd957cc5ff0a0063afd851cf34c84002dc1 /gdb/breakpoint.c | |
parent | 888cab372296966d80fc5d77ec17e1ee226cf56d (diff) | |
download | gdb-e236ba4424253599ed1f75a522c863d2afc8cd03.zip gdb-e236ba4424253599ed1f75a522c863d2afc8cd03.tar.gz gdb-e236ba4424253599ed1f75a522c863d2afc8cd03.tar.bz2 |
Make insert_breakpoints return void.
* breakpoint.h (insert_breakpoints): Change
return type to void.
* breakpoint.c (insert_breakpoints): Change
return type to void. Rename local return_val
variable to error.
* infrun.c (keep_going): Instead of checking
return value from insert_breakpoints, catch exception.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 49958e6..0f96997 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1220,11 +1220,11 @@ in which its expression is valid.\n"), Both return zero if successful, or an `errno' value if could not write the inferior. */ -int +void insert_breakpoints (void) { struct bp_location *b, *temp; - int return_val = 0; /* return success code. */ + int error = 0; int val = 0; int disabled_breaks = 0; int hw_breakpoint_error = 0; @@ -1265,10 +1265,10 @@ insert_breakpoints (void) &disabled_breaks, &process_warning, &hw_breakpoint_error); if (val) - return_val = val; + error = val; } - if (return_val) + if (error) { /* If a hardware breakpoint or watchpoint was inserted, add a message about possibly exhausted resources. */ @@ -1286,7 +1286,6 @@ You may have requested too many hardware breakpoints/watchpoints.\n"); target_terminal_ours_for_output (); error_stream (tmp_error_stream); } - return return_val; } int |