Rewrite TRY/CATCH
[deliverable/binutils-gdb.git] / gdb / language.c
index e2f400161b37484a0df31be5d3e13b8aef18989e..0dc4cb301190e88ce74430ea37dd397eeac2fc56 100644 (file)
@@ -1,6 +1,6 @@
 /* Multiple source language support for GDB.
 
-   Copyright (C) 1991-2018 Free Software Foundation, Inc.
+   Copyright (C) 1991-2019 Free Software Foundation, Inc.
 
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
@@ -172,18 +172,17 @@ set_language_command (const char *ignore,
              /* Enter auto mode.  Set to the current frame's language, if
                  known, or fallback to the initial language.  */
              language_mode = language_mode_auto;
-             TRY
+             try
                {
                  struct frame_info *frame;
 
                  frame = get_selected_frame (NULL);
                  flang = get_frame_language (frame);
                }
-             CATCH (ex, RETURN_MASK_ERROR)
+             catch (const gdb_exception_RETURN_MASK_ERROR &ex)
                {
                  flang = language_unknown;
                }
-             END_CATCH
 
              if (flang != language_unknown)
                set_language (flang);
@@ -1172,9 +1171,9 @@ For Fortran the default is off; for other languages the default is on."),
 
   add_set_language_command ();
 
-  language = xstrdup ("auto");
-  range = xstrdup ("auto");
-  case_sensitive = xstrdup ("auto");
+  language = "auto";
+  range = "auto";
+  case_sensitive = "auto";
 
   /* Have the above take effect.  */
   set_language (language_auto);
This page took 0.024653 seconds and 4 git commands to generate.