gdb/rs6000: Use default gdbarch methods where possible
[deliverable/binutils-gdb.git] / gdb / rust-lang.c
index 5099185a0f3d2c965167db67bb7929bc33c13d82..9a123c338ef5c1a6e4a22ad3a5d5c84fd88394bc 100644 (file)
@@ -1,6 +1,6 @@
 /* Rust language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1743,18 +1743,17 @@ tuple structs, and tuple-like enum variants"));
                       field_name, TYPE_NAME (outer_type),
                       rust_last_path_segment (TYPE_NAME (type)));
 
-           TRY
+           try
              {
                result = value_struct_elt (&lhs, NULL, field_name,
                                           NULL, "structure");
              }
-           CATCH (except, RETURN_MASK_ERROR)
+           catch (const gdb_exception_error &except)
              {
                error (_("Could not find field %s of struct variant %s::%s"),
                       field_name, TYPE_NAME (outer_type),
                       rust_last_path_segment (TYPE_NAME (type)));
              }
-           END_CATCH
          }
        else
          result = value_struct_elt (&lhs, NULL, field_name, NULL, "structure");
@@ -2020,7 +2019,7 @@ rust_lookup_symbol_nonlocal (const struct language_defn *langdef,
                             const struct block *block,
                             const domain_enum domain)
 {
-  struct block_symbol result = {NULL, NULL};
+  struct block_symbol result = {};
 
   if (symbol_lookup_debug)
     {
@@ -2142,6 +2141,5 @@ extern const struct language_defn rust_language_defn =
   default_search_name_hash,
   &default_varobj_ops,
   NULL,
-  NULL,
-  LANG_MAGIC
+  NULL
 };
This page took 0.024719 seconds and 4 git commands to generate.