diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-07-12 13:06:54 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-07-12 13:06:54 +0000 |
commit | 852483bc793b005fc6a7cad8bb6a15846fe7ef25 (patch) | |
tree | 245dcaded679cc857d24048d5f07b0a90b154eb6 /gdb/dwarf2expr.c | |
parent | 22a44745e3c45871c3124196752c5b7bf0c593e3 (diff) | |
download | gdb-852483bc793b005fc6a7cad8bb6a15846fe7ef25.zip gdb-852483bc793b005fc6a7cad8bb6a15846fe7ef25.tar.gz gdb-852483bc793b005fc6a7cad8bb6a15846fe7ef25.tar.bz2 |
* dwarf2expr.h: Tweak comment.
(struct dwarf_expr_context): Use `gdb_byte *' in read_mem and
get_frame_base function pointers.
(read_uleb128, read_sleb128): Change return type and types of
first two arguments to `gdb_byte *'.
(dwarf2_read_address): Change types of first two arguments to
`gdb_byte *'.
* dwarf2expr.c: Tweak comment.
(dwarf_expr_eval): Change type of second argument to `gdb_byte *'.
(read_uleb128, read_sleb128): Change return type and types of
first two arguments to `gdb_byte *'.
(dwarf2_read_address): Change types of first two arguments to
`gdb_byte *'.
(execute_stack_op): Change types of last two arguments to
`gdb_byte *'. Use `gdb_byte *' for byte buffers.
* dwarf2loc.h: Tweak comment.
(struct dwarf2_locexpr_baton, struct dwarf2_loclist_baton): Use
`gdb_byte *' for byte buffers.
* dwarf2loc.c (find_location_expression): Change return type to
`gdb_byte *'. Use `gdb_byte *' for byte buffers. Change length
to `unsigned int'.
(dwarf_expr_read_reg): Use `gdb_byte *' for byte buffer. Remove
bogus cast.
(dwarf_expr_read_mem): Change type of second argument to
`gdb_byte *'.
(dwarf_expr_frame_base): Change type of second argument to
`gdb_byte **'.
(dwarf2_evaluate_loc_desc): Change type of third argument to
`gdb_byte *'.
(needs_frame_read_mem): Change type of second argument to
`gdb_byte *'.
(needs_frame_frame_base): Change type of second argument
`gdb_byte **'. Use gdb_byte for lit0.
(dwarf2_tracepoint_var_ref): Change type of fourth argument to
`gdb_byte *'. Use `gdb_byte *' for byte buffer.
(loclist_read_variable, loclist_tracepoint_var_ref): Use `gdb_byte
*' for byte buffer.
* dwarf2-frame.c (struct dwarf2_cie, struct dwarf2_fde)
(struct dwarf2_frame_state): Use gdb_byte instead of `unsigned
char'.
(read_reg): Use `gdb_byte *' for byte buffers. Remove redundant
cast.
(read_mem): Change second argument to `gdb_byte *'.
(no_get_frame_base): Change second argument to `gdb_byte **'.
(execute_stack_op): Change first argument to `gdb_byte *'.
(execute_cfa_program): Change first two arguments to `gdb_byte *'.
Use gdb_byte instead of `unsigned int'. Use temprorary variable
to store result of read_uleb128.
(struct comp_unit): Use `gdb_byte *' for byte buffers.
(read_1_byte, read_4_bytes, read_8_bytes): Change last argument to
`gdb_byte *'.
(read_unsigned_leb128, read_signed_leb128): Change second argument
to `gdb_byte *'. Use gdb_byte instead of `unsigned char'.
(read_initial_length): Change second argument to `gdb_byte *'.
Remove redundant casts.
(read_encoded_value): Use gdb_byte instead of `unsigned char'.
Remove bogus casts.
(decode_frame_entry_1): Change return type and second argument to
`gdb_byte *'. Use `gdb_byte *' for byte buffers. Use gdb_byte
instead of `unsigned char'.
(decode_frame_entry): Change return type and second argument to
`gdb_byte *'. Use `gdb_byte *' for byte buffers.
(dwarf2_build_frame_info): Use `gdb_byte *' for byte buffers.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r-- | gdb/dwarf2expr.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 0d318e4..e75dcee 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -1,5 +1,7 @@ -/* Dwarf2 Expression Evaluator - Copyright 2001, 2002, 2003 Free Software Foundation, Inc. +/* DWARF 2 Expression Evaluator. + + Copyright 2001, 2002, 2003, 2005 Free Software Foundation, Inc. + Contributed by Daniel Berlin (dan@dberlin.org) This file is part of GDB. @@ -30,7 +32,7 @@ /* Local prototypes. */ static void execute_stack_op (struct dwarf_expr_context *, - unsigned char *, unsigned char *); + gdb_byte *, gdb_byte *); /* Create a new context for the expression evaluator. */ @@ -130,8 +132,7 @@ add_piece (struct dwarf_expr_context *ctx, CTX. */ void -dwarf_expr_eval (struct dwarf_expr_context *ctx, unsigned char *addr, - size_t len) +dwarf_expr_eval (struct dwarf_expr_context *ctx, gdb_byte *addr, size_t len) { execute_stack_op (ctx, addr, addr + len); } @@ -140,12 +141,12 @@ dwarf_expr_eval (struct dwarf_expr_context *ctx, unsigned char *addr, by R, and return the new value of BUF. Verify that it doesn't extend past BUF_END. */ -unsigned char * -read_uleb128 (unsigned char *buf, unsigned char *buf_end, ULONGEST * r) +gdb_byte * +read_uleb128 (gdb_byte *buf, gdb_byte *buf_end, ULONGEST * r) { unsigned shift = 0; ULONGEST result = 0; - unsigned char byte; + gdb_byte byte; while (1) { @@ -166,12 +167,12 @@ read_uleb128 (unsigned char *buf, unsigned char *buf_end, ULONGEST * r) by R, and return the new value of BUF. Verify that it doesn't extend past BUF_END. */ -unsigned char * -read_sleb128 (unsigned char *buf, unsigned char *buf_end, LONGEST * r) +gdb_byte * +read_sleb128 (gdb_byte *buf, gdb_byte *buf_end, LONGEST * r) { unsigned shift = 0; LONGEST result = 0; - unsigned char byte; + gdb_byte byte; while (1) { @@ -196,7 +197,7 @@ read_sleb128 (unsigned char *buf, unsigned char *buf_end, LONGEST * r) number of bytes read from BUF. */ CORE_ADDR -dwarf2_read_address (unsigned char *buf, unsigned char *buf_end, int *bytes_read) +dwarf2_read_address (gdb_byte *buf, gdb_byte *buf_end, int *bytes_read) { CORE_ADDR result; @@ -252,8 +253,8 @@ signed_address_type (void) evaluate the expression between OP_PTR and OP_END. */ static void -execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, - unsigned char *op_end) +execute_stack_op (struct dwarf_expr_context *ctx, + gdb_byte *op_ptr, gdb_byte *op_end) { ctx->in_reg = 0; @@ -449,7 +450,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, break; case DW_OP_fbreg: { - unsigned char *datastart; + gdb_byte *datastart; size_t datalen; unsigned int before_stack_len; @@ -519,7 +520,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, { case DW_OP_deref: { - char *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT); + gdb_byte *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT); int bytes_read; (ctx->read_mem) (ctx->baton, buf, result, @@ -533,7 +534,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, case DW_OP_deref_size: { - char *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT); + gdb_byte *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT); int bytes_read; (ctx->read_mem) (ctx->baton, buf, result, *op_ptr++); |