aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-01-23 21:20:58 +0000
committerPer Bothner <per@bothner.com>1995-01-23 21:20:58 +0000
commit6d34c23688b9d441b6daba6dff56d6a4389bc058 (patch)
treef2acf81c173f32cd8b679d92911f4298440f896d /gdb/eval.c
parentce51845b10a95dc54e30c5df90706a3902d6d1ed (diff)
downloadgdb-6d34c23688b9d441b6daba6dff56d6a4389bc058.zip
gdb-6d34c23688b9d441b6daba6dff56d6a4389bc058.tar.gz
gdb-6d34c23688b9d441b6daba6dff56d6a4389bc058.tar.bz2
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'<unimlemented>'. * 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.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c7
1 files changed, 6 insertions, 1 deletions
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: