Replace throw_exception with throw in some cases
authorTom Tromey <tom@tromey.com>
Mon, 28 Jan 2019 17:45:45 +0000 (10:45 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Apr 2019 15:05:41 +0000 (09:05 -0600)
This replaces throw_exception with "throw;" when possible.  This was
written by script.  The rule that is followed is that uses of the
form:

   catch (... &name)
     {
       ...
       throw_exception (name);
     }

... can be rewritten.  This should always be safe, because exceptions
are caught by const reference, and therefore can't be modified in the
body of the catch.

gdb/ChangeLog
2019-04-08  Tom Tromey  <tom@tromey.com>

* valops.c (value_rtti_indirect_type): Replace throw_exception
with throw.
* tracefile-tfile.c (tfile_target_open): Replace throw_exception
with throw.
* thread.c (thr_try_catch_cmd): Replace throw_exception with
throw.
* target.c (target_translate_tls_address): Replace throw_exception
with throw.
* stack.c (frame_apply_command_count): Replace throw_exception
with throw.
* solib-spu.c (append_ocl_sos): Replace throw_exception with
throw.
* s390-tdep.c (s390_frame_unwind_cache): Replace throw_exception
with throw.
* rs6000-tdep.c (rs6000_frame_cache)
(rs6000_epilogue_frame_cache): Replace throw_exception with throw.
* remote.c: Replace throw_exception with throw.
* record-full.c (record_full_message, record_full_wait_1)
(record_full_restore): Replace throw_exception with throw.
* record-btrace.c:
(get_thread_current_frame_id, record_btrace_start_replaying)
(cmd_record_btrace_bts_start, cmd_record_btrace_pt_start)
(cmd_record_btrace_start): Replace throw_exception with throw.
* parse.c (parse_exp_in_context_1): Replace throw_exception with
throw.
* linux-nat.c (detach_one_lwp, linux_resume_one_lwp)
(resume_stopped_resumed_lwps): Replace throw_exception with throw.
* linespec.c:
(find_linespec_symbols): Replace throw_exception with throw.
* infrun.c (displaced_step_prepare, resume): Replace
throw_exception with throw.
* infcmd.c (post_create_inferior): Replace throw_exception with
throw.
* inf-loop.c (inferior_event_handler): Replace throw_exception
with throw.
* i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
(i386_sigtramp_frame_cache): Replace throw_exception with throw.
* frame.c (frame_unwind_pc, get_prev_frame_if_no_cycle)
(get_prev_frame_always, get_frame_pc_if_available)
(get_frame_address_in_block_if_available, get_frame_language):
Replace throw_exception with throw.
* frame-unwind.c (frame_unwind_try_unwinder): Replace
throw_exception with throw.
* eval.c (fetch_subexp_value, evaluate_var_value)
(evaluate_funcall, evaluate_subexp_standard): Replace
throw_exception with throw.
* dwarf2loc.c (call_site_find_chain)
(dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval):
Replace throw_exception with throw.
* dwarf2-frame.c (dwarf2_frame_cache): Replace throw_exception
with throw.
* darwin-nat.c (darwin_attach_pid): Replace throw_exception with
throw.
* cp-abi.c (baseclass_offset): Replace throw_exception with throw.
* completer.c (complete_line_internal): Replace throw_exception
with throw.
* compile/compile-object-run.c (compile_object_run): Replace
throw_exception with throw.
* cli/cli-script.c (process_next_line): Replace throw_exception
with throw.
* btrace.c (btrace_compute_ftrace_pt, btrace_compute_ftrace)
(btrace_enable, btrace_maint_update_pt_packets): Replace
throw_exception with throw.
* breakpoint.c (create_breakpoint, save_breakpoints): Replace
throw_exception with throw.
* break-catch-throw.c (re_set_exception_catchpoint): Replace
throw_exception with throw.
* amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
(amd64_epilogue_frame_cache): Replace throw_exception with throw.
* aarch64-tdep.c (aarch64_make_prologue_cache)
(aarch64_make_stub_cache): Replace throw_exception with throw.

gdb/gdbserver/ChangeLog
2019-04-08  Tom Tromey  <tom@tromey.com>

* linux-low.c (linux_detach_one_lwp): Replace throw_exception with
throw.
(linux_resume_one_lwp): Likewise.

36 files changed:
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/amd64-tdep.c
gdb/break-catch-throw.c
gdb/breakpoint.c
gdb/btrace.c
gdb/cli/cli-script.c
gdb/compile/compile-object-run.c
gdb/completer.c
gdb/cp-abi.c
gdb/darwin-nat.c
gdb/dwarf2-frame.c
gdb/dwarf2loc.c
gdb/eval.c
gdb/frame-unwind.c
gdb/frame.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/i386-tdep.c
gdb/inf-loop.c
gdb/infcmd.c
gdb/infrun.c
gdb/linespec.c
gdb/linux-nat.c
gdb/parse.c
gdb/record-btrace.c
gdb/record-full.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/solib-spu.c
gdb/stack.c
gdb/target.c
gdb/thread.c
gdb/tracefile-tfile.c
gdb/valops.c

index a0d8d091e6e4dee541de4efb9f9fd3c47457940f..39c380815aa0045e61e006af98d95127b5d25560 100644 (file)
@@ -1,3 +1,77 @@
+2019-04-08  Tom Tromey  <tom@tromey.com>
+
+       * valops.c (value_rtti_indirect_type): Replace throw_exception
+       with throw.
+       * tracefile-tfile.c (tfile_target_open): Replace throw_exception
+       with throw.
+       * thread.c (thr_try_catch_cmd): Replace throw_exception with
+       throw.
+       * target.c (target_translate_tls_address): Replace throw_exception
+       with throw.
+       * stack.c (frame_apply_command_count): Replace throw_exception
+       with throw.
+       * solib-spu.c (append_ocl_sos): Replace throw_exception with
+       throw.
+       * s390-tdep.c (s390_frame_unwind_cache): Replace throw_exception
+       with throw.
+       * rs6000-tdep.c (rs6000_frame_cache)
+       (rs6000_epilogue_frame_cache): Replace throw_exception with throw.
+       * remote.c: Replace throw_exception with throw.
+       * record-full.c (record_full_message, record_full_wait_1)
+       (record_full_restore): Replace throw_exception with throw.
+       * record-btrace.c:
+       (get_thread_current_frame_id, record_btrace_start_replaying)
+       (cmd_record_btrace_bts_start, cmd_record_btrace_pt_start)
+       (cmd_record_btrace_start): Replace throw_exception with throw.
+       * parse.c (parse_exp_in_context_1): Replace throw_exception with
+       throw.
+       * linux-nat.c (detach_one_lwp, linux_resume_one_lwp)
+       (resume_stopped_resumed_lwps): Replace throw_exception with throw.
+       * linespec.c:
+       (find_linespec_symbols): Replace throw_exception with throw.
+       * infrun.c (displaced_step_prepare, resume): Replace
+       throw_exception with throw.
+       * infcmd.c (post_create_inferior): Replace throw_exception with
+       throw.
+       * inf-loop.c (inferior_event_handler): Replace throw_exception
+       with throw.
+       * i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
+       (i386_sigtramp_frame_cache): Replace throw_exception with throw.
+       * frame.c (frame_unwind_pc, get_prev_frame_if_no_cycle)
+       (get_prev_frame_always, get_frame_pc_if_available)
+       (get_frame_address_in_block_if_available, get_frame_language):
+       Replace throw_exception with throw.
+       * frame-unwind.c (frame_unwind_try_unwinder): Replace
+       throw_exception with throw.
+       * eval.c (fetch_subexp_value, evaluate_var_value)
+       (evaluate_funcall, evaluate_subexp_standard): Replace
+       throw_exception with throw.
+       * dwarf2loc.c (call_site_find_chain)
+       (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval):
+       Replace throw_exception with throw.
+       * dwarf2-frame.c (dwarf2_frame_cache): Replace throw_exception
+       with throw.
+       * darwin-nat.c (darwin_attach_pid): Replace throw_exception with
+       throw.
+       * cp-abi.c (baseclass_offset): Replace throw_exception with throw.
+       * completer.c (complete_line_internal): Replace throw_exception
+       with throw.
+       * compile/compile-object-run.c (compile_object_run): Replace
+       throw_exception with throw.
+       * cli/cli-script.c (process_next_line): Replace throw_exception
+       with throw.
+       * btrace.c (btrace_compute_ftrace_pt, btrace_compute_ftrace)
+       (btrace_enable, btrace_maint_update_pt_packets): Replace
+       throw_exception with throw.
+       * breakpoint.c (create_breakpoint, save_breakpoints): Replace
+       throw_exception with throw.
+       * break-catch-throw.c (re_set_exception_catchpoint): Replace
+       throw_exception with throw.
+       * amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
+       (amd64_epilogue_frame_cache): Replace throw_exception with throw.
+       * aarch64-tdep.c (aarch64_make_prologue_cache)
+       (aarch64_make_stub_cache): Replace throw_exception with throw.
+
 2019-04-08  Tom Tromey  <tom@tromey.com>
 
        * common/common-exceptions.c (throw_exception): Rename from
index ebd84e9dc2beaa78963ee08b868d509b066493df..7eecb52eb11d160ebbae319aad6e8949855f1cca 100644 (file)
@@ -881,7 +881,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
@@ -1015,7 +1015,7 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
index 5b8a94002d576d2351de9ab91105f4648cabc62f..f4a1af905065bb8f29cd0ed6c375ed8dc6a14a5d 100644 (file)
@@ -2588,7 +2588,7 @@ amd64_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
@@ -2715,7 +2715,7 @@ amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   *this_cache = cache;
@@ -2895,7 +2895,7 @@ amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
index 3b9cdd6c257fd7bf8c3e1d486df48d914545408b..a221cb315189a94f658ff546d1e699d3c99927ba 100644 (file)
@@ -214,7 +214,7 @@ re_set_exception_catchpoint (struct breakpoint *self)
          /* NOT_FOUND_ERROR just means the breakpoint will be
             pending, so let it through.  */
          if (ex.error != NOT_FOUND_ERROR)
-           throw_exception (ex);
+           throw;
        }
     }
 
index 5bfa5b2b7b340054f480335b04a691550b12ec8e..3047ef3827dcdf11930496f49ee0e99941117e4d 100644 (file)
@@ -9253,7 +9253,7 @@ create_breakpoint (struct gdbarch *gdbarch,
             error.  */
 
          if (pending_break_support == AUTO_BOOLEAN_FALSE)
-           throw_exception (e);
+           throw;
 
          exception_print (gdb_stderr, e);
 
@@ -9271,7 +9271,7 @@ create_breakpoint (struct gdbarch *gdbarch,
          pending = 1;
        }
       else
-       throw_exception (e);
+       throw;
     }
 
   if (!pending && canonical.lsals.empty ())
@@ -13635,7 +13635,7 @@ location_to_sals (struct breakpoint *b, struct event_location *location,
             happens only when a binary has changed, I don't know
             which approach is better.  */
          b->enable_state = bp_disabled;
-         throw_exception (e);
+         throw;
        }
     }
 
@@ -15034,7 +15034,7 @@ save_breakpoints (const char *filename, int from_tty,
        catch (const gdb_exception &ex)
          {
          current_uiout->redirect (NULL);
-           throw_exception (ex);
+           throw;
          }
 
        current_uiout->redirect (NULL);
index 4b2f0797206828c0e7b451c7792bf3e20a13354c..c6d564e7062037653ddabe17b468407b296484f9 100644 (file)
@@ -1484,7 +1484,7 @@ btrace_compute_ftrace_pt (struct thread_info *tp,
 
       btrace_finalize_ftrace_pt (decoder, tp, level);
 
-      throw_exception (error);
+      throw;
     }
 
   btrace_finalize_ftrace_pt (decoder, tp, level);
@@ -1560,7 +1560,7 @@ btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace,
     {
       btrace_finalize_ftrace (tp, gaps);
 
-      throw_exception (error);
+      throw;
     }
 
   btrace_finalize_ftrace (tp, gaps);
@@ -1631,7 +1631,7 @@ btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
     {
       btrace_disable (tp);
 
-      throw_exception (exception);
+      throw;
     }
 }
 
@@ -3065,7 +3065,7 @@ btrace_maint_update_pt_packets (struct btrace_thread_info *btinfo)
       pt_pkt_free_decoder (decoder);
 
       if (except.reason < 0)
-       throw_exception (except);
+       throw;
     }
 
   pt_pkt_free_decoder (decoder);
index d124d3a6c2840c286df5e890a0a4c6c82ed29d43..361ead472508a2dcbab30c24a979c6ec9091d29b 100644 (file)
@@ -1057,7 +1057,7 @@ process_next_line (const char *p, struct command_line **command,
       catch (const gdb_exception &ex)
        {
          free_command_lines (command);
-         throw_exception (ex);
+         throw;
        }
     }
 
index 5bad049fc51c00734e0199aa541bd981462404dc..32e46f941044abd59006adc91571ad303e709d48 100644 (file)
@@ -183,7 +183,7 @@ compile_object_run (struct compile_module *module)
       gdb_assert (!(dtor_found && executed));
       if (!dtor_found && !executed)
        do_module_cleanup (data, 0);
-      throw_exception (ex);
+      throw;
     }
 
   dtor_found = find_dummy_frame_dtor (do_module_cleanup, data);
index d4099c7c52d24382694a6e22e182fe09adb92c8c..5d1decca1d1b0b9ad5fb5a2c6c2c86a36b63c797 100644 (file)
@@ -1451,7 +1451,7 @@ complete_line_internal (completion_tracker &tracker,
   catch (const gdb_exception_error &except)
     {
       if (except.error != MAX_COMPLETIONS_REACHED_ERROR)
-       throw_exception (except);
+       throw;
     }
 }
 
index 8e54538752ee60ace7484e4bc1f3e91a068215de..d95b1404dce6578860e1e8267fa1142ab809b601 100644 (file)
@@ -82,7 +82,7 @@ baseclass_offset (struct type *type, int index, const gdb_byte *valaddr,
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
 
       throw_error (NOT_AVAILABLE_ERROR,
                   _("Cannot determine virtual baseclass offset "
index 02604338b5620e50b5b06a4ddf2e7daf4d008ea5..8282ef27e61168307556ccfa4370a92c9335ee5a 100644 (file)
@@ -1693,7 +1693,7 @@ darwin_attach_pid (struct inferior *inf)
       exit_inferior (inf);
       inferior_ptid = null_ptid;
 
-      throw_exception (ex);
+      throw;
     }
 
   target_ops *darwin_ops = get_native_target ();
index a24235ab84fa2c7d284207ae217fc6a328a13242..b1db1ede038f96a6ba9de5b44bc789c9e82cf05a 100644 (file)
@@ -1076,7 +1076,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
          return cache;
        }
 
-      throw_exception (ex);
+      throw;
     }
 
   /* Initialize the register state.  */
index 12951f546f88de331501207a1d4ac44cafad7a36..2b8aeee83ad82ad0bad29ea1b5358be3673df2af 100644 (file)
@@ -1209,7 +1209,7 @@ call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
          return NULL;
        }
       else
-       throw_exception (e);
+       throw;
     }
 
   return retval;
@@ -2185,7 +2185,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
          return allocate_optimized_out_value (subobj_type);
        }
       else
-       throw_exception (ex);
+       throw;
     }
 
   if (ctx.pieces.size () > 0)
@@ -2397,7 +2397,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
          return 0;
        }
       else
-       throw_exception (ex);
+       throw;
     }
 
   switch (ctx.location)
index fa03369b394f61949d99501b453900b474b7ccef..aed89e5f85a1a6806ec4b25df6f76d6d38e4336f 100644 (file)
@@ -217,7 +217,7 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp,
            break;
          /* Fall through.  */
        default:
-         throw_exception (ex);
+         throw;
          break;
        }
     }
@@ -722,7 +722,7 @@ evaluate_var_value (enum noside noside, const block *blk, symbol *var)
   catch (const gdb_exception_error &except)
     {
       if (noside != EVAL_AVOID_SIDE_EFFECTS)
-       throw_exception (except);
+       throw;
 
       ret = value_zero (SYMBOL_TYPE (var), not_lval);
     }
@@ -964,7 +964,7 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
                  if (except.error == NOT_FOUND_ERROR)
                    break;
                  else
-                   throw_exception (except);
+                   throw;
                }
 
                arg2 = value;
@@ -2053,7 +2053,7 @@ evaluate_subexp_standard (struct type *expect_type,
              if (except.error == NOT_FOUND_ERROR)
                break;
              else
-               throw_exception (except);
+               throw;
            }
 
          arg1 = value;
index 8510086001ab474e8875d848d93fe819653ec97a..4b38f64c2f10576ffb1643ec5f790e3309aced3d 100644 (file)
@@ -120,7 +120,7 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache,
             should always accept the frame.  */
          return 0;
        }
-      throw_exception (ex);
+      throw;
     }
 
   if (res)
index 1a76bdf3b1f43e55919acdc5aae76cd51809e77b..f4303d13cc16da715722fac33b5ba97edbc9fe86 100644 (file)
@@ -922,7 +922,7 @@ frame_unwind_pc (struct frame_info *this_frame)
                                    this_frame->level);
            }
          else
-           throw_exception (ex);
+           throw;
        }
 
       if (pc_p)
@@ -1918,7 +1918,7 @@ get_prev_frame_if_no_cycle (struct frame_info *this_frame)
       prev_frame->next = NULL;
       this_frame->prev = NULL;
 
-      throw_exception (ex);
+      throw;
     }
 
   return prev_frame;
@@ -2116,7 +2116,7 @@ get_prev_frame_always (struct frame_info *this_frame)
          prev_frame = NULL;
        }
       else
-       throw_exception (ex);
+       throw;
     }
 
   return prev_frame;
@@ -2385,7 +2385,7 @@ get_frame_pc_if_available (struct frame_info *frame, CORE_ADDR *pc)
       if (ex.error == NOT_AVAILABLE_ERROR)
        return 0;
       else
-       throw_exception (ex);
+       throw;
     }
 
   return 1;
@@ -2466,7 +2466,7 @@ get_frame_address_in_block_if_available (struct frame_info *this_frame,
     {
       if (ex.error == NOT_AVAILABLE_ERROR)
        return 0;
-      throw_exception (ex);
+      throw;
     }
 
   return 1;
@@ -2750,7 +2750,7 @@ get_frame_language (struct frame_info *frame)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   if (pc_p)
index a3599d728f34935850978ca7726a297d8e5384ee..e82e90156473b1cffcc3625b0326eb27a85227d8 100644 (file)
@@ -1,3 +1,9 @@
+2019-04-08  Tom Tromey  <tom@tromey.com>
+
+       * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
+       throw.
+       (linux_resume_one_lwp): Likewise.
+
 2019-04-08  Tom Tromey  <tom@tromey.com>
 
        * gdbreplay.c: Update.
index 4b1a211ab7a08e10e901c8c4a930de9f06c98b5a..94af240a5c2ce92e7b35e1a9a3b84d9f02ca9806 100644 (file)
@@ -1543,7 +1543,7 @@ linux_detach_one_lwp (struct lwp_info *lwp)
   catch (const gdb_exception_error &ex)
     {
       if (!check_ptrace_stopped_lwp_gone (lwp))
-       throw_exception (ex);
+       throw;
     }
 
   lwpid = lwpid_of (thread);
@@ -4514,7 +4514,7 @@ linux_resume_one_lwp (struct lwp_info *lwp,
   catch (const gdb_exception_error &ex)
     {
       if (!check_ptrace_stopped_lwp_gone (lwp))
-       throw_exception (ex);
+       throw;
     }
 }
 
index 7249005ee9ee616cd50e442c6b950a262d975955..54d9dd873b80ed79c2d48b3e27acd4c7d8ea94a2 100644 (file)
@@ -2089,7 +2089,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
@@ -2268,7 +2268,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
@@ -2463,7 +2463,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   *this_cache = cache;
index 85bd69cac2b24b32c0bc2dc26bdbb1bf14e612cf..f0d8def14157c5c0e6da3aae8fb6c11cdb443b18 100644 (file)
@@ -79,7 +79,7 @@ inferior_event_handler (enum inferior_event_type event_type,
                 the prompt and is typing some unrelated command, so
                 just inform the user and swallow the exception.  */
              if (current_ui->prompt_state == PROMPT_BLOCKED)
-               throw_exception (e);
+               throw;
              else
                exception_print (gdb_stderr, e);
            }
index 116c5f0079611c5f168440f47a42c2c08f9688b1..3b26fd4a4671dcee99039a1764e4b60d67c003d0 100644 (file)
@@ -454,7 +454,7 @@ post_create_inferior (struct target_ops *target, int from_tty)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   if (exec_bfd)
index deb7bd6abd61aa14a1c4570fd065b1e768973a7c..37713b24feeb9d3d48158a5184a294cb4d8d9fea 100644 (file)
@@ -1786,7 +1786,7 @@ displaced_step_prepare (thread_info *thread)
 
       if (ex.error != MEMORY_ERROR
          && ex.error != NOT_SUPPORTED_ERROR)
-       throw_exception (ex);
+       throw;
 
       if (debug_infrun)
        {
@@ -2624,7 +2624,7 @@ resume (gdb_signal sig)
         we're running in non-stop mode.  */
       if (inferior_ptid != null_ptid)
        delete_single_step_breakpoints (inferior_thread ());
-      throw_exception (ex);
+      throw;
     }
 }
 
index 0ed9d7cf9778de75f9e08724f60ceb539929f804..c42ddba731510dfab7a128515323ae02ec099a4b 100644 (file)
@@ -3152,7 +3152,7 @@ event_location_to_sals (linespec_parser *parser,
          }
        catch (const gdb_exception_error &except)
          {
-           throw_exception (except);
+           throw;
          }
       }
       break;
@@ -3966,7 +3966,7 @@ find_linespec_symbols (struct linespec_state *state,
          catch (const gdb_exception_error &except)
            {
              if (except.error != NOT_FOUND_ERROR)
-               throw_exception (except);
+               throw;
            }
        }
     }
index ed1f67c4a67c060ecbee6eb11201d482b0d67fd5..65165a2d46bdb1f99657aeb70383a5969fb1347f 100644 (file)
@@ -1408,7 +1408,7 @@ detach_one_lwp (struct lwp_info *lp, int *signo_p)
   catch (const gdb_exception_error &ex)
     {
       if (!check_ptrace_stopped_lwp_gone (lp))
-       throw_exception (ex);
+       throw;
     }
 
   if (ptrace (PTRACE_DETACH, lwpid, 0, signo) < 0)
@@ -1590,7 +1590,7 @@ linux_resume_one_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
   catch (const gdb_exception_error &ex)
     {
       if (!check_ptrace_stopped_lwp_gone (lp))
-       throw_exception (ex);
+       throw;
     }
 }
 
@@ -3552,7 +3552,7 @@ resume_stopped_resumed_lwps (struct lwp_info *lp, const ptid_t wait_ptid)
       catch (const gdb_exception_error &ex)
        {
          if (!check_ptrace_stopped_lwp_gone (lp))
-           throw_exception (ex);
+           throw;
        }
     }
 
index cc1fd7fd1a3bf107b5d386a06163f89f2ed22c73..3e02057bf7b0dd044916d6a05b74b10dff709d53 100644 (file)
@@ -1147,7 +1147,7 @@ parse_exp_in_context (const char **stringptr, CORE_ADDR pc,
         expression elements have been written, then there's nothing
         to do, so fail.  */
       if (! ps.parse_completion || ps.expout_ptr == 0)
-       throw_exception (except);
+       throw;
     }
 
   /* We have to operate on an "expression *", due to la_post_parser,
index f5a5306fe1232962d7a61c3ae294de56c877c06b..21085d5c62c7ef7eeea0b420deb3a0f137f2ea94 100644 (file)
@@ -1485,7 +1485,7 @@ record_btrace_target::insert_breakpoint (struct gdbarch *gdbarch,
   catch (const gdb_exception &except)
     {
       replay_memory_access = old;
-      throw_exception (except);
+      throw;
     }
   replay_memory_access = old;
 
@@ -1515,7 +1515,7 @@ record_btrace_target::remove_breakpoint (struct gdbarch *gdbarch,
   catch (const gdb_exception &except)
     {
       replay_memory_access = old;
-      throw_exception (except);
+      throw;
     }
   replay_memory_access = old;
 
@@ -1994,7 +1994,7 @@ get_thread_current_frame_id (struct thread_info *tp)
       /* Restore the previous execution state.  */
       set_executing (inferior_ptid, executing);
 
-      throw_exception (except);
+      throw;
     }
 
   /* Restore the previous execution state.  */
@@ -2075,7 +2075,7 @@ record_btrace_start_replaying (struct thread_info *tp)
 
       registers_changed_thread (tp);
 
-      throw_exception (except);
+      throw;
     }
 
   return replay;
@@ -2896,7 +2896,7 @@ cmd_record_btrace_bts_start (const char *args, int from_tty)
   catch (const gdb_exception &exception)
     {
       record_btrace_conf.format = BTRACE_FORMAT_NONE;
-      throw_exception (exception);
+      throw;
     }
 }
 
@@ -2917,7 +2917,7 @@ cmd_record_btrace_pt_start (const char *args, int from_tty)
   catch (const gdb_exception &exception)
     {
       record_btrace_conf.format = BTRACE_FORMAT_NONE;
-      throw_exception (exception);
+      throw;
     }
 }
 
@@ -2946,7 +2946,7 @@ cmd_record_btrace_start (const char *args, int from_tty)
       catch (const gdb_exception &ex)
        {
          record_btrace_conf.format = BTRACE_FORMAT_NONE;
-         throw_exception (ex);
+         throw;
        }
     }
 }
index 57d7bb0e11432644bc04de5f457b9f61e048838b..95a0353d754ee0c5b58e8f5727dffd46a598b70d 100644 (file)
@@ -764,7 +764,7 @@ record_full_message (struct regcache *regcache, enum gdb_signal signal)
   catch (const gdb_exception &ex)
     {
       record_full_list_release (record_full_arch_list_tail);
-      throw_exception (ex);
+      throw;
     }
 
   record_full_list->next = record_full_arch_list_head;
@@ -1444,7 +1444,7 @@ record_full_wait_1 (struct target_ops *ops,
          else
            record_full_list = record_full_list->prev;
 
-         throw_exception (ex);
+         throw;
        }
     }
 
@@ -2476,7 +2476,7 @@ record_full_restore (void)
   catch (const gdb_exception &ex)
     {
       record_full_list_release (record_full_arch_list_tail);
-      throw_exception (ex);
+      throw;
     }
 
   /* Add record_full_arch_list_head to the end of record list.  */
index 318459405ce24aef1e84f256f32fca6f1ac90c2b..767c69444b84ae00b3ceddd59ff1b31bfa3426c1 100644 (file)
@@ -5611,7 +5611,7 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p)
           already before throwing the exception.  */
        if (ex.error != TARGET_CLOSE_ERROR)
          remote_unpush_target ();
-       throw_exception (ex);
+       throw;
       }
   }
 
@@ -9784,7 +9784,7 @@ remote_target::remote_kill_k ()
       /* Otherwise, something went wrong.  We didn't actually kill
         the target.  Just propagate the exception, and let the
         user or higher layers decide what to do.  */
-      throw_exception (ex);
+      throw;
     }
 }
 
@@ -13143,7 +13143,7 @@ remote_target::get_trace_status (struct trace_status *ts)
          exception_fprintf (gdb_stderr, ex, "qTStatus: ");
          return -1;
        }
-      throw_exception (ex);
+      throw;
     }
 
   result = packet_ok (p, &remote_protocol_packets[PACKET_qTStatus]);
index 7a59e119f4fa60cd019de0f0b5f9fc8798aa68b6..375b960f0bab2288e65092e9240bbe7cf90dd02c 100644 (file)
@@ -3471,7 +3471,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
       return (struct rs6000_frame_cache *) (*this_cache);
     }
 
@@ -3700,7 +3700,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return cache;
index a08738881ff113b9dedb0a36e92dc6c0ee49e782..4b931017a8dd933a537a7bd60720f1f400c5aa9e 100644 (file)
@@ -2557,7 +2557,7 @@ s390_frame_unwind_cache (struct frame_info *this_frame,
   catch (const gdb_exception_error &ex)
     {
       if (ex.error != NOT_AVAILABLE_ERROR)
-       throw_exception (ex);
+       throw;
     }
 
   return info;
index 94d8cadabcb304842ab8d9b5105d370868169235..c5dc8639f1e286afab8edc0fbe93f39e3e36f998 100644 (file)
@@ -141,7 +141,7 @@ append_ocl_sos (struct so_list **link_ptr)
                case MEMORY_ERROR:
                  break;
                default:
-                 throw_exception (ex);
+                 throw;
                  break;
                }
            }
index c1a9d9dfb09579fab5dee79f309917a703408d6d..f7fd9433b5600cc2acb7b955b61193ce37d8ff08 100644 (file)
@@ -2715,7 +2715,7 @@ frame_apply_command_count (const char *which_command,
              if (flags.cont)
                printf_filtered ("%s\n", ex.what ());
              else
-               throw_exception (ex);
+               throw;
            }
        }
     }
index 2234400211384b09cb6136ff2efee8679fac50fa..3ab5671c463cdb62dc24dbcf1c6d8b3340d785ea 100644 (file)
@@ -767,7 +767,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
                       objfile_name (objfile), ex.what ());
              break;
            default:
-             throw_exception (ex);
+             throw;
              break;
            }
        }
index 010cd24e7e18b8af14f96eb8fefb85e5684e9cc8..5b23b8c1f2a7db16298a793d6a71c3d4ade99301 100644 (file)
@@ -1482,7 +1482,7 @@ thr_try_catch_cmd (thread_info *thr, const char *cmd, int from_tty,
          if (flags.cont)
            printf_filtered ("%s\n", ex.what ());
          else
-           throw_exception (ex);
+           throw;
        }
     }
 }
index 72d2f70eaf98b5f5cb8211dde5876c409313150b..593556a8ba8935da475909fb6d82b57f2c15015d 100644 (file)
@@ -551,7 +551,7 @@ tfile_target_open (const char *arg, int from_tty)
     {
       /* Remove the partially set up target.  */
       unpush_target (&tfile_ops);
-      throw_exception (ex);
+      throw;
     }
 
   inferior_appeared (current_inferior (), TFILE_PID);
index 0de4067c6b25e3ab17e7738f9ab42f213872498d..fd92a4d165575086d9f00e4c5fa8787c427c3691 100644 (file)
@@ -3634,7 +3634,7 @@ value_rtti_indirect_type (struct value *v, int *full,
                 type.  */
              return NULL;
            }
-         throw_exception (except);
+         throw;
        }
     }
   else
This page took 0.069945 seconds and 4 git commands to generate.