Change some psymtab fields to bool
authorTom Tromey <tom@tromey.com>
Tue, 22 Oct 2019 22:47:27 +0000 (16:47 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 26 Jan 2020 23:40:21 +0000 (16:40 -0700)
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

gdb/ChangeLog
gdb/ctfread.c
gdb/dbxread.c
gdb/dwarf2read.c
gdb/mdebugread.c
gdb/psympriv.h
gdb/psymtab.c
gdb/xcoffread.c

index 7be36c11b5ff56808e3cf5ec994ff07dcec62cd9..345a81c935df05a2a0fa08ee78765443fce2383a 100644 (file)
@@ -1,3 +1,16 @@
+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.
index f3c067ee0b3255f037b25068d8af9f1c723c2358..c41d96f3e587b68fdbf362a007e6fc5921492455 100644 (file)
@@ -1241,7 +1241,7 @@ psymtab_to_symtab (struct partial_symtab *pst)
       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.
index bec622a10f5f925c0f67cab386928c0edbba72ee..d4d7901e914885b404f08a06a371acb2989cc09d 100644 (file)
@@ -2108,7 +2108,7 @@ dbx_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
       read_ofile_symtab (objfile, pst);
     }
 
-  pst->readin = 1;
+  pst->readin = true;
 }
 
 /* Read in all of the symbols for a given psymtab for real.
index a81a77aa5040309513fd9c2743463fc023c9abe8..63944105edc1d88c059e1df63906b6b015159ade 100644 (file)
@@ -7945,7 +7945,7 @@ create_type_unit_group (struct dwarf2_cu *cu, sect_offset line_offset_struct)
        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 @@ create_partial_symtab (struct dwarf2_per_cu_data *per_cu, const char *name)
 
   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 @@ build_type_psymtabs_reader (const struct die_reader_specs *reader,
 
   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 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
     {
       /* 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 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu,
     {
       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 @@ process_full_type_unit (struct dwarf2_per_cu_data *per_cu,
     {
       struct partial_symtab *pst = per_cu->v.psymtab;
       pst->compunit_symtab = cust;
-      pst->readin = 1;
+      pst->readin = true;
     }
 
   /* Not needed any more.  */
index 393a433792e06c027bcbdfbcdd036c25cae35faa..f28c0b25cbfc6f71cb21fa8d9f3976c90862346a 100644 (file)
@@ -3862,7 +3862,7 @@ psymtab_to_symtab_1 (struct objfile *objfile,
 
   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
index dc89db2ff6492014348bf7eafb1c9e89a1495078..ce28112439caf4c94295ebd2dc2fa606fa70fa9f 100644 (file)
@@ -239,21 +239,21 @@ struct partial_symtab
   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.  */
 
index 5f428679fb20cfb55eb5986678555449f15a998d..037ed19182d1f95a246d56cb196af37f06e89acb 100644 (file)
@@ -1005,7 +1005,7 @@ psym_print_stats (struct objfile *objfile)
   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);
index 66ace43051a8dd26d694e22da022fa66ec9fe0f9..27e49f755e8674b0e11e3f895c6d58ff2ff4a13f 100644 (file)
@@ -1859,7 +1859,7 @@ xcoff_psymtab_to_symtab_1 (struct objfile *objfile, struct partial_symtab *pst)
       read_xcoff_symtab (objfile, pst);
     }
 
-  pst->readin = 1;
+  pst->readin = true;
 }
 
 /* Read in all of the symbols for a given psymtab for real.
This page took 0.040393 seconds and 4 git commands to generate.