public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use bool for dwarf2_has_info
@ 2022-12-23 21:15 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-12-23 21:15 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32e62cbcc11caedcc00b7551c153d8f1b25e075c
commit 32e62cbcc11caedcc00b7551c153d8f1b25e075c
Author: Tom Tromey <tom@tromey.com>
Date: Wed Dec 21 14:35:01 2022 -0700
Use bool for dwarf2_has_info
This changes dwarf2_has_info to return bool.
Diff:
---
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-23 21:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 21:15 [binutils-gdb] Use bool for dwarf2_has_info Tom Tromey
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).