aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-09-01 12:54:38 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-09-01 12:55:57 -0400
commitef5e5b0b6534bed8e9dcd6494acf3f8ee418f8e5 (patch)
tree9b864d1f92574dd5b51d29e7cc4bac2dd2555404 /gdb/psymtab.c
parent4c8584be76a2b95cd4876ac8622cb0f2d0fc1ad4 (diff)
downloadgdb-ef5e5b0b6534bed8e9dcd6494acf3f8ee418f8e5.zip
gdb-ef5e5b0b6534bed8e9dcd6494acf3f8ee418f8e5.tar.gz
gdb-ef5e5b0b6534bed8e9dcd6494acf3f8ee418f8e5.tar.bz2
gdb: change bcache::insert `added` parameter to bool
It is currently an int, but it is used as a bool. gdb/ChangeLog: * bcache.h (struct bcache) <insert>: Change type of `added` to pointer to bool. * bcache.c (bcache::insert): Likewise. * gdbtypes.c (check_types_worklist): Adjust. * psymtab.c (add_psymbol_to_bcache): Adjust. Change-Id: I06b1041636c656782a89cb6106c9ae2593f61616
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 47e31aa..59db469 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1590,9 +1590,8 @@ psymbol_compare (const void *addr1, const void *addr2, int length)
different domain (or address) is possible and correct. */
static struct partial_symbol *
-add_psymbol_to_bcache (const partial_symbol &psymbol,
- struct objfile *objfile,
- int *added)
+add_psymbol_to_bcache (const partial_symbol &psymbol, struct objfile *objfile,
+ bool *added)
{
/* Stash the partial symbol away in the cache. */
return ((struct partial_symbol *)
@@ -1618,12 +1617,10 @@ add_psymbol_to_list (const partial_symbol &psymbol,
psymbol_placement where,
struct objfile *objfile)
{
- struct partial_symbol *psym;
-
- int added;
+ bool added;
/* Stash the partial symbol away in the cache. */
- psym = add_psymbol_to_bcache (psymbol, objfile, &added);
+ partial_symbol *psym = add_psymbol_to_bcache (psymbol, objfile, &added);
/* Do not duplicate global partial symbols. */
if (where == psymbol_placement::GLOBAL && !added)