/* DWARF 2 location expression support for GDB.
- Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of GDB.
#if !defined (DWARF2LOC_H)
#define DWARF2LOC_H
-struct symbol_ops;
+struct symbol_computed_ops;
struct objfile;
struct dwarf2_per_cu_data;
/* Return the address size given in the compilation unit header for CU. */
CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
+/* Return the offset size given in the compilation unit header for CU. */
+int dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu);
+
+struct dwarf2_locexpr_baton dwarf2_fetch_die_location_block
+ (unsigned int offset, struct dwarf2_per_cu_data *per_cu);
+
/* The symbol location baton types used by the DWARF-2 reader (i.e.
SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct
dwarf2_locexpr_baton" is for a symbol with a single location
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;
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;
struct dwarf2_per_cu_data *per_cu;
};
-extern const struct symbol_ops dwarf2_locexpr_funcs;
-extern const struct symbol_ops dwarf2_loclist_funcs;
+extern const struct symbol_computed_ops dwarf2_locexpr_funcs;
+extern const struct symbol_computed_ops dwarf2_loclist_funcs;
#endif /* dwarf2loc.h */