aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-05-26 15:21:13 +0000
committerTom Tromey <tromey@redhat.com>2010-05-26 15:21:13 +0000
commit947bb88ff5da0770e9d6a238b54b7053ba8bd6fb (patch)
treeee4a6113473d5a90090fd5726719e4a3f24b1042
parentf418727792e6e7dce38aa382db45d147bccd8ed7 (diff)
downloadgdb-947bb88ff5da0770e9d6a238b54b7053ba8bd6fb.zip
gdb-947bb88ff5da0770e9d6a238b54b7053ba8bd6fb.tar.gz
gdb-947bb88ff5da0770e9d6a238b54b7053ba8bd6fb.tar.bz2
* dwarf2loc.h (struct dwarf2_locexpr_baton) <data>: Now const.
(struct dwarf2_loclist_baton) <data>: Likewise. * dwarf2loc.c (find_location_expression): Constify return type. (dwarf2_evaluate_loc_desc): Make 'data' argument const. (dwarf2_loc_desc_needs_frame): Likewise. (loclist_read_variable): Constify. (loclist_describe_location): Likewise. (loclist_tracepoint_var_ref): Likewise.
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/dwarf2loc.c14
-rw-r--r--gdb/dwarf2loc.h4
3 files changed, 20 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac78a60..46dc0b0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,14 @@
+2010-05-26 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2loc.h (struct dwarf2_locexpr_baton) <data>: Now const.
+ (struct dwarf2_loclist_baton) <data>: Likewise.
+ * dwarf2loc.c (find_location_expression): Constify return type.
+ (dwarf2_evaluate_loc_desc): Make 'data' argument const.
+ (dwarf2_loc_desc_needs_frame): Likewise.
+ (loclist_read_variable): Constify.
+ (loclist_describe_location): Likewise.
+ (loclist_tracepoint_var_ref): Likewise.
+
2010-05-25 Tom Tromey <tromey@redhat.com>
* dwarf2loc.c (dwarf_expr_frame_base): Constify.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 481501b..a5d10f5 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -54,12 +54,12 @@ dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
For now, only return the first matching location expression; there
can be more than one in the list. */
-static gdb_byte *
+static const gdb_byte *
find_location_expression (struct dwarf2_loclist_baton *baton,
size_t *locexpr_length, CORE_ADDR pc)
{
CORE_ADDR low, high;
- gdb_byte *loc_ptr, *buf_end;
+ const gdb_byte *loc_ptr, *buf_end;
int length;
struct objfile *objfile = dwarf2_per_cu_objfile (baton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -773,7 +773,7 @@ static struct lval_funcs pieced_value_funcs = {
static struct value *
dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
- gdb_byte *data, unsigned short size,
+ const gdb_byte *data, unsigned short size,
struct dwarf2_per_cu_data *per_cu)
{
struct value *retval;
@@ -953,7 +953,7 @@ needs_frame_tls_address (void *baton, CORE_ADDR offset)
requires a frame to evaluate. */
static int
-dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size,
+dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
struct dwarf2_per_cu_data *per_cu)
{
struct needs_frame_baton baton;
@@ -1515,7 +1515,7 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
struct value *val;
- gdb_byte *data;
+ const gdb_byte *data;
size_t size;
data = find_location_expression (dlbaton, &size,
@@ -1557,7 +1557,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
CORE_ADDR low, high;
- gdb_byte *loc_ptr, *buf_end;
+ const gdb_byte *loc_ptr, *buf_end;
int length, first = 1;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -1639,7 +1639,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value)
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
- gdb_byte *data;
+ const gdb_byte *data;
size_t size;
data = find_location_expression (dlbaton, &size, ax->scope);
diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
index fa0bd11..d246e7c 100644
--- a/gdb/dwarf2loc.h
+++ b/gdb/dwarf2loc.h
@@ -43,7 +43,7 @@ CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
struct dwarf2_locexpr_baton
{
/* Pointer to the start of the location expression. */
- gdb_byte *data;
+ const gdb_byte *data;
/* Length of the location expression. */
unsigned long size;
@@ -60,7 +60,7 @@ struct dwarf2_loclist_baton
CORE_ADDR base_address;
/* Pointer to the start of the location list. */
- gdb_byte *data;
+ const gdb_byte *data;
/* Length of the location list. */
unsigned long size;