diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-08-17 05:57:16 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-08-17 05:57:16 -0400 |
commit | f54be24b106fdd3278490ff5b37910fbef87e210 (patch) | |
tree | 9f54d9e3ff20e3124e744844e119d34ec105d8c3 | |
parent | d4d05d13eba6e0ed01767999fc87e75599ddd86e (diff) | |
download | gdb-f54be24b106fdd3278490ff5b37910fbef87e210.zip gdb-f54be24b106fdd3278490ff5b37910fbef87e210.tar.gz gdb-f54be24b106fdd3278490ff5b37910fbef87e210.tar.bz2 |
gdb: use bool in dwarf2_loc_desc_get_symbol_read_needs
This variable is really a boolean, so use the bool type.
gdb/ChangeLog:
* dwarf2/loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
bool.
Change-Id: I814a47d1200f3b88722c54c822fd49607a6b77be
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/loc.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e733a7..b5917e9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-08-17 Simon Marchi <simon.marchi@polymtl.ca> + + * dwarf2/loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use + bool. + 2020-08-17 Tom de Vries <tdevries@suse.de> PR gdb/26393 diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 72cf926..b02ef91 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -2849,8 +2849,6 @@ dwarf2_loc_desc_get_symbol_read_needs (const gdb_byte *data, size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile) { - int in_reg; - scoped_value_mark free_values; symbol_needs_eval_context ctx (per_objfile); @@ -2863,16 +2861,17 @@ dwarf2_loc_desc_get_symbol_read_needs (const gdb_byte *data, size_t size, ctx.eval (data, size); - in_reg = ctx.location == DWARF_VALUE_REGISTER; + bool in_reg = ctx.location == DWARF_VALUE_REGISTER; /* If the location has several pieces, and any of them are in registers, then we will need a frame to fetch them from. */ for (dwarf_expr_piece &p : ctx.pieces) if (p.location == DWARF_VALUE_REGISTER) - in_reg = 1; + in_reg = true; if (in_reg) ctx.needs = SYMBOL_NEEDS_FRAME; + return ctx.needs; } |