diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-05-05 00:15:07 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-07-12 12:09:52 +0100 |
commit | 603490bf53fe1885ef45f9d0fb783b32f8ef6049 (patch) | |
tree | 9e27628f4592e507ad0f3d0cd6cc35053ee57548 /gdb/dwarf2loc.c | |
parent | 592f9d271caaa22a6b299cfaaf6ce3394796e0e2 (diff) | |
download | gdb-603490bf53fe1885ef45f9d0fb783b32f8ef6049.zip gdb-603490bf53fe1885ef45f9d0fb783b32f8ef6049.tar.gz gdb-603490bf53fe1885ef45f9d0fb783b32f8ef6049.tar.bz2 |
gdb: Convert dwarf2_evaluate_property to return bool
Convert dwarf2_evaluate_property to return a bool, there should be no
user visible change after this commit.
gdb/ChangeLog:
* dwarf2loc.c (dwarf2_evaluate_property): Change return type, and
update return statements.
* dwarf2loc.h (dwarf2_evaluate_property): Update return type on
declaration, and update comment to match.
* gdbtypes.c (resolve_dynamic_array): Update call to
dwarf2_evaluate_property to match new return type.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 83ff1f4..ea6b36e 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -2425,14 +2425,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, /* See dwarf2loc.h. */ -int +bool dwarf2_evaluate_property (const struct dynamic_prop *prop, struct frame_info *frame, struct property_addr_info *addr_stack, CORE_ADDR *value) { if (prop == NULL) - return 0; + return false; if (frame == NULL && has_stack_frames ()) frame = get_selected_frame (NULL); @@ -2454,7 +2454,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, *value = value_as_address (val); } - return 1; + return true; } } break; @@ -2476,7 +2476,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, if (!value_optimized_out (val)) { *value = value_as_address (val); - return 1; + return true; } } } @@ -2484,7 +2484,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, case PROP_CONST: *value = prop->data.const_val; - return 1; + return true; case PROP_ADDR_OFFSET: { @@ -2510,11 +2510,11 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, val = value_at (baton->offset_info.type, pinfo->addr + baton->offset_info.offset); *value = value_as_address (val); - return 1; + return true; } } - return 0; + return false; } /* See dwarf2loc.h. */ |