Make dwarf2_evaluate_property parameter const

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.
This commit is contained in:
Tom Tromey 2020-03-20 13:04:56 -06:00
parent c623cc9089
commit fe26d3a34a
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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.

View File

@ -2453,7 +2453,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
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)
@ -2542,7 +2542,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
{
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)

View File

@ -96,7 +96,7 @@ struct property_addr_info
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