diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eca73a4fe4..157dc4933e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-07-15 Simon Marchi + + * expprint.c (dump_subexp_body_standard): Handle OP_STRING. + 2014-07-14 Edjunior Barbosa Machado * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no hardware diff --git a/gdb/expprint.c b/gdb/expprint.c index 97188edcb6..aa9e4d76a3 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -1011,12 +1011,29 @@ dump_subexp_body_standard (struct expression *exp, elt = dump_subexp (exp, stream, elt); } break; + case OP_STRING: + { + LONGEST len = exp->elts[elt].longconst; + LONGEST type = exp->elts[elt + 1].longconst; + + fprintf_filtered (stream, "Language-specific string type: %s", + plongest (type)); + + /* Skip length. */ + elt += 1; + + /* Skip string content. */ + elt += BYTES_TO_EXP_ELEM (len); + + /* Skip length and ending OP_STRING. */ + elt += 2; + } + break; default: case OP_NULL: case MULTI_SUBSCRIPT: case OP_F77_UNDETERMINED_ARGLIST: case OP_COMPLEX: - case OP_STRING: case OP_BOOL: case OP_M2_STRING: case OP_THIS: