[gdb/symtab] Add get/set functions for per_cu->lang/unit_type
[binutils-gdb.git] / gdb / ada-lang.c
index 5ddca104dc3f6dbeb98cd144d7a4b277e3bcdd8b..93e0c67613f0a927416d5618abacce71013b65de 100644 (file)
@@ -6492,7 +6492,8 @@ ada_tag_value_at_base_address (struct value *obj)
       tem = value_cast (ptr_type, tem);
       offset_to_top = value_as_long (value_ind (tem));
     }
-  else if (offset_to_top > 0)
+
+  if (offset_to_top > 0)
     {
       /* OFFSET_TO_TOP used to be a positive value to be subtracted
         from the base address.  This was however incompatible with
@@ -12104,7 +12105,7 @@ static std::string ada_exception_catchpoint_cond_string
 
 /* An instance of this type is used to represent an Ada catchpoint.  */
 
-struct ada_catchpoint : public base_breakpoint
+struct ada_catchpoint : public code_breakpoint
 {
   ada_catchpoint (struct gdbarch *gdbarch_,
                  enum ada_exception_catchpoint_kind kind,
@@ -12113,12 +12114,12 @@ struct ada_catchpoint : public base_breakpoint
                  bool tempflag,
                  bool enabled,
                  bool from_tty)
-    : base_breakpoint (gdbarch_, bp_catchpoint),
+    : code_breakpoint (gdbarch_, bp_catchpoint),
       m_kind (kind)
   {
     add_location (sal);
 
-    /* Unlike most base_breakpoint types, Ada catchpoints are
+    /* Unlike most code_breakpoint types, Ada catchpoints are
        pspace-specific.  */
     gdb_assert (sal.pspace != nullptr);
     this->pspace = sal.pspace;
@@ -12143,8 +12144,8 @@ struct ada_catchpoint : public base_breakpoint
 
     enable_state = enabled ? bp_enabled : bp_disabled;
     disposition = tempflag ? disp_del : disp_donttouch;
-    location = string_to_event_location (&addr_string_,
-                                        language_def (language_ada));
+    locspec = string_to_location_spec (&addr_string_,
+                                      language_def (language_ada));
     language = language_ada;
   }
 
@@ -12247,7 +12248,7 @@ ada_catchpoint::re_set ()
 {
   /* Call the base class's method.  This updates the catchpoint's
      locations.  */
-  this->base_breakpoint::re_set ();
+  this->code_breakpoint::re_set ();
 
   /* Reparse the exception conditional expressions.  One for each
      location.  */