gdb/riscv: Allow breakpoints to be created at invalid addresses
[deliverable/binutils-gdb.git] / gas / read.c
index 1f211b6819b467eeab08a6667cd8a9199f0078c2..ac0048d832dd19508a15e456cfbbabbb2671e467 100644 (file)
@@ -1,5 +1,5 @@
 /* read.c - read a source file -
-   Copyright (C) 1986-2018 Free Software Foundation, Inc.
+   Copyright (C) 1986-2019 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -3117,7 +3117,8 @@ do_repeat_with_expander (size_t count,
          sub = strstr (processed.ptr, expander);
          len = sprintf (sub, "%lu", (unsigned long) count);
          gas_assert (len < 8);
-         strcpy (sub + len, sub + 8);
+         memmove (sub + len, sub + 8,
+                  processed.ptr + processed.len - (sub + 8));
          processed.len -= (8 - len);
          sb_add_sb (& many, & processed);
          sb_kill (& processed);
@@ -5251,7 +5252,7 @@ s_leb128 (int sign)
 
   do
     {
-      deferred_expression (&exp);
+      expression (&exp);
       emit_leb128_expr (&exp, sign);
     }
   while (*input_line_pointer++ == ',');
@@ -5363,8 +5364,6 @@ stringer (int bits_appendzero)
          if (append_zero)
            stringer_append_char (0, bitsize);
 
-         know (input_line_pointer[-1] == '\"');
-
 #if !defined(NO_LISTING) && defined (OBJ_ELF)
          /* In ELF, when gcc is emitting DWARF 1 debugging output, it
             will emit .string with a filename in the .debug section
@@ -5389,8 +5388,11 @@ stringer (int bits_appendzero)
          c = get_single_number ();
          stringer_append_char (c, bitsize);
          if (*input_line_pointer != '>')
-           as_bad (_("expected <nn>"));
-
+           {
+             as_bad (_("expected <nn>"));
+             ignore_rest_of_line ();
+             return;
+           }
          input_line_pointer++;
          break;
        case ',':
@@ -6211,10 +6213,7 @@ static char *saved_limit;
    overruns should not occur.  Saves the current input line pointer so that
    it can be restored by calling restore_ilp().
 
-   Does not support recursion.
-
-   FIXME: This function is currently only used by stabs.c but that
-   should be extended to other files in the gas source directory.  */
+   Does not support recursion.  */
 
 void
 temp_ilp (char *buf)
This page took 0.026588 seconds and 4 git commands to generate.