gdb/rust: Handle printing structures containing strings
[deliverable/binutils-gdb.git] / gdb / linespec.c
index c42ddba731510dfab7a128515323ae02ec099a4b..f418e03b774531a8af0b0c16090f378b4fad3e81 100644 (file)
@@ -2508,7 +2508,7 @@ parse_linespec (linespec_parser *parser, const char *arg,
                symbol_name_match_type match_type)
 {
   linespec_token token;
-  struct gdb_exception file_exception = exception_none;
+  struct gdb_exception file_exception;
 
   /* A special case to start.  It has become quite popular for
      IDEs to work around bugs in the previous parser by quoting
@@ -2613,9 +2613,9 @@ parse_linespec (linespec_parser *parser, const char *arg,
            = symtabs_from_filename (user_filename.get (),
                                     PARSER_STATE (parser)->search_pspace);
        }
-      catch (const gdb_exception_error &ex)
+      catch (gdb_exception_error &ex)
        {
-         file_exception = ex;
+         file_exception = std::move (ex);
        }
 
       if (file_exception.reason >= 0)
@@ -2663,7 +2663,7 @@ parse_linespec (linespec_parser *parser, const char *arg,
       /* The linespec didn't parse.  Re-throw the file exception if
         there was one.  */
       if (file_exception.reason < 0)
-       throw_exception (file_exception);
+       throw_exception (std::move (file_exception));
 
       /* Otherwise, the symbol is not found.  */
       symbol_not_found_error (PARSER_EXPLICIT (parser)->function_name,
This page took 0.024727 seconds and 4 git commands to generate.