Change tui_data_item_window::content to be a unique_xmalloc_ptr
[external/binutils.git] / gdb / btrace.c
index 3bfd1c8..466607d 100644 (file)
 #include "filenames.h"
 #include "xml-support.h"
 #include "regcache.h"
-#include "common/rsp-low.h"
+#include "gdbsupport/rsp-low.h"
 #include "gdbcmd.h"
 #include "cli/cli-utils.h"
+#include "gdbarch.h"
 
 /* For maintenance commands.  */
 #include "record-btrace.h"
@@ -687,7 +688,7 @@ ftrace_classify_insn (struct gdbarch *gdbarch, CORE_ADDR pc)
       else if (gdbarch_insn_is_jump (gdbarch, pc))
        iclass = BTRACE_INSN_JUMP;
     }
-  catch (const gdb_exception_RETURN_MASK_ERROR &error)
+  catch (const gdb_exception_error &error)
     {
     }
 
@@ -1106,7 +1107,7 @@ btrace_compute_ftrace_bts (struct thread_info *tp,
            {
              size = gdb_insn_length (gdbarch, pc);
            }
-         catch (const gdb_exception_RETURN_MASK_ERROR &error)
+         catch (const gdb_exception_error &error)
            {
            }
 
@@ -1374,7 +1375,7 @@ btrace_pt_readmem_callback (gdb_byte *buffer, size_t size,
       if (errcode != 0)
        result = -pte_nomap;
     }
-  catch (const gdb_exception_RETURN_MASK_ERROR &error)
+  catch (const gdb_exception_error &error)
     {
       result = -pte_nomap;
     }
@@ -1476,7 +1477,7 @@ btrace_compute_ftrace_pt (struct thread_info *tp,
 
       ftrace_add_pt (btinfo, decoder, &level, gaps);
     }
-  catch (const gdb_exception_RETURN_MASK_ALL &error)
+  catch (const gdb_exception &error)
     {
       /* Indicate a gap in the trace if we quit trace processing.  */
       if (error.reason == RETURN_QUIT && !btinfo->functions.empty ())
@@ -1484,7 +1485,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);
@@ -1556,11 +1557,11 @@ btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace,
     {
       btrace_compute_ftrace_1 (tp, btrace, cpu, gaps);
     }
-  catch (const gdb_exception_RETURN_MASK_ALL &error)
+  catch (const gdb_exception &error)
     {
       btrace_finalize_ftrace (tp, gaps);
 
-      throw_exception (error);
+      throw;
     }
 
   btrace_finalize_ftrace (tp, gaps);
@@ -1627,11 +1628,11 @@ btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
          && can_access_registers_thread (tp))
        btrace_add_pc (tp);
     }
-  catch (const gdb_exception_RETURN_MASK_ALL &exception)
+  catch (const gdb_exception &exception)
     {
       btrace_disable (tp);
 
-      throw_exception (exception);
+      throw;
     }
 }
 
@@ -2074,7 +2075,7 @@ parse_xml_raw (struct gdb_xml_parser *parser, const char *body_text,
   gdb::unique_xmalloc_ptr<gdb_byte> data ((gdb_byte *) xmalloc (size));
   bin = data.get ();
 
-  /* We use hex encoding - see common/rsp-low.h.  */
+  /* We use hex encoding - see gdbsupport/rsp-low.h.  */
   while (len > 0)
     {
       char hi, lo;
@@ -3060,12 +3061,12 @@ btrace_maint_update_pt_packets (struct btrace_thread_info *btinfo)
     {
       btrace_maint_decode_pt (&btinfo->maint, decoder);
     }
-  catch (const gdb_exception_RETURN_MASK_ALL &except)
+  catch (const gdb_exception &except)
     {
       pt_pkt_free_decoder (decoder);
 
       if (except.reason < 0)
-       throw_exception (except);
+       throw;
     }
 
   pt_pkt_free_decoder (decoder);
@@ -3528,21 +3529,19 @@ One argument specifies the starting packet of a ten-line print.\n\
 Two arguments with comma between specify starting and ending packets to \
 print.\n\
 Preceded with '+'/'-' the second argument specifies the distance from the \
-first.\n"),
+first."),
           &maint_btrace_cmdlist);
 
   add_cmd ("clear-packet-history", class_maintenance,
           maint_btrace_clear_packet_history_cmd,
           _("Clears the branch tracing packet history.\n\
-Discards the raw branch tracing data but not the execution history data.\n\
-"),
+Discards the raw branch tracing data but not the execution history data."),
           &maint_btrace_cmdlist);
 
   add_cmd ("clear", class_maintenance, maint_btrace_clear_cmd,
           _("Clears the branch tracing data.\n\
 Discards the raw branch tracing data and the execution history data.\n\
-The next 'record' command will fetch the branch tracing data anew.\n\
-"),
+The next 'record' command will fetch the branch tracing data anew."),
           &maint_btrace_cmdlist);
 
 }