Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Sourceware to Gerrit sync (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom Tromey <tromey@sourceware.org>, gdb-patches@sourceware.org
Subject: [pushed] Change some psymtab fields to bool
Date: Sun, 26 Jan 2020 23:49:00 -0000	[thread overview]
Message-ID: <20200126234108.840EF20AF7@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1572228195000.I206761d083493589049ea0bc785ed6542339234d@gnutoolchain-gerrit.osci.io>

The original change was created by Tom Tromey.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/375
......................................................................

Change some psymtab fields to bool

This changes a few fields in partial_symtab to have type bool.

gdb/ChangeLog
2020-01-26  Tom Tromey  <tom@tromey.com>

	* xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
	* psymtab.c (psym_print_stats): Update.
	* psympriv.h (struct partial_symtab) <readin,
	psymtabs_addrmap_supported, anonymous>: Now bool.
	* mdebugread.c (psymtab_to_symtab_1): Update.
	* dwarf2read.c (create_type_unit_group, create_partial_symtab)
	(build_type_psymtabs_reader, psymtab_to_symtab_1)
	(process_full_comp_unit, process_full_type_unit): Update.
	* dbxread.c (dbx_psymtab_to_symtab_1): Update.
	* ctfread.c (psymtab_to_symtab): Update.

Change-Id: I206761d083493589049ea0bc785ed6542339234d
---
M gdb/ChangeLog
M gdb/ctfread.c
M gdb/dbxread.c
M gdb/dwarf2read.c
M gdb/mdebugread.c
M gdb/psympriv.h
M gdb/psymtab.c
M gdb/xcoffread.c
8 files changed, 30 insertions(+), 17 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7be36c1..345a81c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
 2020-01-26  Tom Tromey  <tom@tromey.com>
 
+	* xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
+	* psymtab.c (psym_print_stats): Update.
+	* psympriv.h (struct partial_symtab) <readin,
+	psymtabs_addrmap_supported, anonymous>: Now bool.
+	* mdebugread.c (psymtab_to_symtab_1): Update.
+	* dwarf2read.c (create_type_unit_group, create_partial_symtab)
+	(build_type_psymtabs_reader, psymtab_to_symtab_1)
+	(process_full_comp_unit, process_full_type_unit): Update.
+	* dbxread.c (dbx_psymtab_to_symtab_1): Update.
+	* ctfread.c (psymtab_to_symtab): Update.
+
+2020-01-26  Tom Tromey  <tom@tromey.com>
+
 	* mdebugread.c (parse_partial_symbols): Use discard_psymtab.
 	* psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
 	* psymtab.c (psymtab_storage): Delete psymtabs.
diff --git a/gdb/ctfread.c b/gdb/ctfread.c
index f3c067e..c41d96f 100644
--- a/gdb/ctfread.c
+++ b/gdb/ctfread.c
@@ -1241,7 +1241,7 @@
       set_symbol_address (ccp->of, sym, sym->linkage_name ());
     }
 
-  pst->readin = 1;
+  pst->readin = true;
 }
 
 /* Expand partial symbol table PST into a full symbol table.
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index bec622a..d4d7901 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2108,7 +2108,7 @@
       read_ofile_symtab (objfile, pst);
     }
 
-  pst->readin = 1;
+  pst->readin = true;
 }
 
 /* Read in all of the symbols for a given psymtab for real.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a81a77a..6394410 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7945,7 +7945,7 @@
 	name = string_printf ("<type_units_at_0x%x>", line_offset);
 
       pst = create_partial_symtab (per_cu, name.c_str ());
-      pst->anonymous = 1;
+      pst->anonymous = true;
     }
 
   tu_group->hash.dwo_unit = cu->dwo_unit;
@@ -8029,7 +8029,7 @@
 
   pst = start_psymtab_common (objfile, name, 0);
 
-  pst->psymtabs_addrmap_supported = 1;
+  pst->psymtabs_addrmap_supported = true;
 
   /* This is the glue that links PST into GDB's symbol API.  */
   pst->read_symtab_private = per_cu;
@@ -8241,7 +8241,7 @@
 
   prepare_one_comp_unit (cu, type_unit_die, language_minimal);
   pst = create_partial_symtab (per_cu, "");
-  pst->anonymous = 1;
+  pst->anonymous = true;
 
   first_die = load_partial_dies (reader, info_ptr, 1);
 
@@ -9720,7 +9720,7 @@
     {
       /* It's an include file, no symbols to read for it.
          Everything is in the parent symtab.  */
-      pst->readin = 1;
+      pst->readin = true;
       return;
     }
 
@@ -10479,7 +10479,7 @@
     {
       struct partial_symtab *pst = per_cu->v.psymtab;
       pst->compunit_symtab = cust;
-      pst->readin = 1;
+      pst->readin = true;
     }
 
   /* Push it for inclusion processing later.  */
@@ -10559,7 +10559,7 @@
     {
       struct partial_symtab *pst = per_cu->v.psymtab;
       pst->compunit_symtab = cust;
-      pst->readin = 1;
+      pst->readin = true;
     }
 
   /* Not needed any more.  */
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 393a433..f28c0b2 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -3862,7 +3862,7 @@
 
   if (pst->readin)
     return;
-  pst->readin = 1;
+  pst->readin = true;
 
   /* Read in all partial symtabs on which this one is dependent.
      NOTE that we do have circular dependencies, sigh.  We solved
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index dc89db2..ce28112 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -239,21 +239,21 @@
   int statics_offset = 0;
   int n_static_syms = 0;
 
-  /* Non-zero if the symtab corresponding to this psymtab has been
-     readin.  This is located here so that this structure packs better
-     on 64-bit systems.  */
+  /* True if the symtab corresponding to this psymtab has been readin.
+     This is located here so that this structure packs better on
+     64-bit systems.  */
 
-  unsigned char readin = 0;
+  bool readin = false;
 
   /* True iff objfile->psymtabs_addrmap is properly populated for this
      partial_symtab.  For discontiguous overlapping psymtabs is the only usable
      info in PSYMTABS_ADDRMAP.  */
 
-  unsigned char psymtabs_addrmap_supported = 0;
+  bool psymtabs_addrmap_supported = false;
 
   /* True if the name of this partial symtab is not a source file name.  */
 
-  unsigned char anonymous = 0;
+  bool anonymous = false;
 
   /* A flag that is temporarily used when searching psymtabs.  */
 
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 5f42867..037ed19 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1005,7 +1005,7 @@
   i = 0;
   for (partial_symtab *ps : require_partial_symbols (objfile, true))
     {
-      if (ps->readin == 0)
+      if (!ps->readin)
 	i++;
     }
   printf_filtered (_("  Number of psym tables (not yet expanded): %d\n"), i);
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 66ace43..27e49f7 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1859,7 +1859,7 @@
       read_xcoff_symtab (objfile, pst);
     }
 
-  pst->readin = 1;
+  pst->readin = true;
 }
 
 /* Read in all of the symbols for a given psymtab for real.

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I206761d083493589049ea0bc785ed6542339234d
Gerrit-Change-Number: 375
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset


  reply	other threads:[~2020-01-26 23:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  2:03 [review] " Tom Tromey (Code Review)
2020-01-26 23:49 ` Sourceware to Gerrit sync (Code Review) [this message]
2020-01-26 23:58 ` [pushed] " Sourceware to Gerrit sync (Code Review)

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=20200126234108.840EF20AF7@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=noreply@gnutoolchain-gerrit.osci.io \
    --cc=tromey@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