Fix test names starting with uppercase using multi-line gdb_test_no_output
[deliverable/binutils-gdb.git] / gdb / expprint.c
index 59fd4e32330f00c289f6a0ccf2222e1eba9892f7..c37ecb06164a7d0f20f03934781cc45f42970ab6 100644 (file)
@@ -1,6 +1,6 @@
 /* Print in infix form a struct expression.
 
-   Copyright (C) 1986-2014 Free Software Foundation, Inc.
+   Copyright (C) 1986-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -240,7 +240,7 @@ print_subexp_standard (struct expression *exp, int *pos,
          {
            char *s, *nextS;
 
-           s = alloca (strlen (selector) + 1);
+           s = (char *) alloca (strlen (selector) + 1);
            strcpy (s, selector);
            for (tem = 0; tem < nargs; tem++)
              {
@@ -280,7 +280,7 @@ print_subexp_standard (struct expression *exp, int *pos,
             a simple string, revert back to array printing.  Note that
             the last expression element is an explicit null terminator
             byte, which doesn't get printed.  */
-         tempstr = alloca (nargs);
+         tempstr = (char *) alloca (nargs);
          pc += 4;
          while (tem < nargs)
            {
@@ -559,6 +559,26 @@ print_subexp_standard (struct expression *exp, int *pos,
        return;
       }
 
+    case OP_RANGE:
+      {
+       enum range_type range_type;
+
+       range_type = (enum range_type)
+         longest_to_int (exp->elts[pc + 1].longconst);
+       *pos += 2;
+
+       fputs_filtered ("RANGE(", stream);
+       if (range_type == HIGH_BOUND_DEFAULT
+           || range_type == NONE_BOUND_DEFAULT)
+         print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
+       fputs_filtered ("..", stream);
+       if (range_type == LOW_BOUND_DEFAULT
+           || range_type == NONE_BOUND_DEFAULT)
+         print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
+       fputs_filtered (")", stream);
+       return;
+      }
+
       /* Default ops */
 
     default:
@@ -1025,6 +1045,42 @@ dump_subexp_body_standard (struct expression *exp,
        elt += 2;
       }
       break;
+    case OP_RANGE:
+      {
+       enum range_type range_type;
+
+       range_type = (enum range_type)
+         longest_to_int (exp->elts[elt].longconst);
+       elt += 2;
+
+       switch (range_type)
+         {
+         case BOTH_BOUND_DEFAULT:
+           fputs_filtered ("Range '..'", stream);
+           break;
+         case LOW_BOUND_DEFAULT:
+           fputs_filtered ("Range '..EXP'", stream);
+           break;
+         case HIGH_BOUND_DEFAULT:
+           fputs_filtered ("Range 'EXP..'", stream);
+           break;
+         case NONE_BOUND_DEFAULT:
+           fputs_filtered ("Range 'EXP..EXP'", stream);
+           break;
+         default:
+           fputs_filtered ("Invalid Range!", stream);
+           break;
+         }
+
+       if (range_type == HIGH_BOUND_DEFAULT
+           || range_type == NONE_BOUND_DEFAULT)
+         elt = dump_subexp (exp, stream, elt);
+       if (range_type == LOW_BOUND_DEFAULT
+           || range_type == NONE_BOUND_DEFAULT)
+         elt = dump_subexp (exp, stream, elt);
+      }
+      break;
+
     default:
     case OP_NULL:
     case MULTI_SUBSCRIPT:
This page took 0.025527 seconds and 4 git commands to generate.