From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [pushed] Use bool for dwarf2_has_info
Date: Fri, 23 Dec 2022 14:11:22 -0700 [thread overview]
Message-ID: <20221223211122.611635-1-tom@tromey.com> (raw)
This changes dwarf2_has_info to return bool.
---
gdb/dwarf2/public.h | 6 +++---
gdb/dwarf2/read.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/dwarf2/public.h b/gdb/dwarf2/public.h
index a9d4682c856..44352720097 100644
--- a/gdb/dwarf2/public.h
+++ b/gdb/dwarf2/public.h
@@ -20,9 +20,9 @@
#ifndef DWARF2_PUBLIC_H
#define DWARF2_PUBLIC_H
-extern int dwarf2_has_info (struct objfile *,
- const struct dwarf2_debug_sections *,
- bool = false);
+extern bool dwarf2_has_info (struct objfile *,
+ const struct dwarf2_debug_sections *,
+ bool = false);
/* A DWARF names index variant. */
enum class dw_index_kind
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index db67dfc5a33..7bd12c107e2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1549,13 +1549,13 @@ dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu,
interposition is possible and so symbol values must follow copy
relocation rules. */
-int
+bool
dwarf2_has_info (struct objfile *objfile,
const struct dwarf2_debug_sections *names,
bool can_copy)
{
if (objfile->flags & OBJF_READNEVER)
- return 0;
+ return false;
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
--
2.38.1
reply other threads:[~2022-12-23 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221223211122.611635-1-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).