dwarf2_evaluate_property should not modify its "addr_stack"
parameter's contents. This patch makes this part of the API, by
marking it const.
gdb/ChangeLog
2020-03-20 Tom Tromey <tromey@adacore.com>
* dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
const.
* dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
const.
+2020-03-20 Tom Tromey <tromey@adacore.com>
+
+ * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
+ const.
+ * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
+ const.
+
2020-03-20 Simon Marchi <simon.marchi@efficios.com>
* ptrace.m4: Don't check for ptrace declaration.
bool
dwarf2_evaluate_property (const struct dynamic_prop *prop,
struct frame_info *frame,
- struct property_addr_info *addr_stack,
+ const struct property_addr_info *addr_stack,
CORE_ADDR *value)
{
if (prop == NULL)
{
struct dwarf2_property_baton *baton
= (struct dwarf2_property_baton *) prop->data.baton;
- struct property_addr_info *pinfo;
+ const struct property_addr_info *pinfo;
struct value *val;
for (pinfo = addr_stack; pinfo != NULL; pinfo = pinfo->next)
bool dwarf2_evaluate_property (const struct dynamic_prop *prop,
struct frame_info *frame,
- struct property_addr_info *addr_stack,
+ const struct property_addr_info *addr_stack,
CORE_ADDR *value);
/* A helper for the compiler interface that compiles a single dynamic