From: Simon Marchi Date: Wed, 11 Mar 2026 18:05:27 +0000 (-0400) Subject: gdb/dwarf: change dwarf2_flag_true_p to return bool X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab92a73daa7cc112d3e8fb046cf2d6d86ba32e2b;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: change dwarf2_flag_true_p to return bool Change-Id: Ie60d5d715171f7482f77598553e9236c3fe94ab1 Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index d52f0651de1..827772a2af7 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -724,8 +724,8 @@ static const char *dwarf2_string_attr (struct die_info *die, unsigned int name, static const char *dwarf2_dwo_name (struct die_info *die, struct dwarf2_cu *cu); -static int dwarf2_flag_true_p (struct die_info *die, unsigned name, - struct dwarf2_cu *cu); +static bool dwarf2_flag_true_p (struct die_info *die, unsigned name, + struct dwarf2_cu *cu); static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); @@ -15175,11 +15175,11 @@ dwarf2_dwo_name (struct die_info *die, struct dwarf2_cu *cu) return dwo_name; } -/* Return non-zero iff the attribute NAME is defined for the given DIE, +/* Return true iff the attribute NAME is defined for the given DIE, and holds a non-zero value. This function should only be used for DW_FORM_flag or DW_FORM_flag_present attributes. */ -static int +static bool dwarf2_flag_true_p (struct die_info *die, unsigned name, struct dwarf2_cu *cu) { struct attribute *attr = dwarf2_attr (die, name, cu);