From 6d34c23688b9d441b6daba6dff56d6a4389bc058 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Mon, 23 Jan 1995 21:20:58 +0000 Subject: Add support for Chill bitstring literals (e.h. H'FF00'). * ch-exp.y (match_bitstring_literal): Fix for proper endianness. * expprint.c (print_subexp): Don't call error on OP_BITSTRING, just print B''. * gdbtypes.c (create_set_type): Fix bug in length calculation. * valops.c, value.h (value_bitstring): New function. * eval.c (evaluate_subexp): Implement support for OP_BITSTRING. * ch-typeprint.c (chill_type_print_base): For TYPE_CODE_FUNC, check that return type is non-void, and print in proper Chill syntax. --- gdb/eval.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index a179840..a564fb3 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -346,7 +346,12 @@ evaluate_subexp (expect_type, exp, pos, noside) return value_string (&exp->elts[pc + 2].string, tem); case OP_BITSTRING: - error ("support for OP_BITSTRING unimplemented"); + tem = longest_to_int (exp->elts[pc + 1].longconst); + (*pos) + += 3 + BYTES_TO_EXP_ELEM ((tem + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT); + if (noside == EVAL_SKIP) + goto nosideret; + return value_bitstring (&exp->elts[pc + 2].string, tem); break; case OP_ARRAY: -- cgit v1.1