Prefer object over notype symbols when disassembling
[deliverable/binutils-gdb.git] / gdb / break-catch-throw.c
index c0b3eec63d167c3c140e96d226d905db7aeb1ad0..e9523a6eb86014a207b74ffbfa137ae6799467d3 100644 (file)
@@ -83,6 +83,14 @@ struct exception_catchpoint : public breakpoint
   std::unique_ptr<compiled_regex> pattern;
 };
 
+/* See breakpoint.h.  */
+
+bool
+is_exception_catchpoint (breakpoint *bp)
+{
+  return bp->ops == &gnu_v3_exception_catchpoint_ops;
+}
+
 \f
 
 /* A helper function that fetches exception probe arguments.  This
@@ -98,14 +106,16 @@ fetch_probe_arguments (struct value **arg0, struct value **arg1)
   unsigned n_args;
 
   pc_probe = find_probe_by_pc (pc);
-  if (pc_probe.prob == NULL
-      || pc_probe.prob->get_provider () != "libstdcxx"
+  if (pc_probe.prob == NULL)
+    error (_("did not find exception probe (does libstdcxx have SDT probes?)"));
+
+  if (pc_probe.prob->get_provider () != "libstdcxx"
       || (pc_probe.prob->get_name () != "catch"
          && pc_probe.prob->get_name () != "throw"
          && pc_probe.prob->get_name () != "rethrow"))
     error (_("not stopped at a C++ exception catchpoint"));
 
-  n_args = pc_probe.prob->get_argument_count (frame);
+  n_args = pc_probe.prob->get_argument_count (get_frame_arch (frame));
   if (n_args < 2)
     error (_("C++ exception catchpoint has too few arguments"));
 
@@ -227,7 +237,7 @@ print_it_exception_catchpoint (bpstat bs)
   bp_temp = b->disposition == disp_del;
   uiout->text (bp_temp ? "Temporary catchpoint "
                       : "Catchpoint ");
-  uiout->field_int ("bkptno", b->number);
+  uiout->field_signed ("bkptno", b->number);
   uiout->text ((kind == EX_EVENT_THROW ? " (exception thrown), "
                : (kind == EX_EVENT_CATCH ? " (exception caught), "
                   : " (exception rethrown), ")));
This page took 0.02576 seconds and 4 git commands to generate.