[gdb/symtab] Fix more style issues in v9 .gdb_index section support

Message ID 20231019091503.21850-1-tdevries@suse.de
State Committed
Headers
Series [gdb/symtab] Fix more style issues in v9 .gdb_index section support |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed

Commit Message

Tom de Vries Oct. 19, 2023, 9:15 a.m. UTC
  I noticed a few more style issues in commit 8b9c08eddac ("[gdb/symtab] Add
name_of_main and language_of_main to the DWARF index"), after checking it
with gcc's check_GNU_style.{sh,py}.

Fix these.

Build on x86_64-linux.
---
 gdb/NEWS                    | 2 +-
 gdb/dwarf2/index-write.c    | 2 +-
 gdb/dwarf2/read-gdb-index.c | 8 ++++----
 gdb/dwarf2/read.c           | 2 +-
 gdb/dwarf2/read.h           | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)


base-commit: d08515a68e5b44f5e0b045e371a996e4196226ed
  

Comments

Eli Zaretskii Oct. 19, 2023, 11:04 a.m. UTC | #1
> From: Tom de Vries <tdevries@suse.de>
> Date: Thu, 19 Oct 2023 11:15:03 +0200
> 
> I noticed a few more style issues in commit 8b9c08eddac ("[gdb/symtab] Add
> name_of_main and language_of_main to the DWARF index"), after checking it
> with gcc's check_GNU_style.{sh,py}.
> 
> Fix these.
> 
> Build on x86_64-linux.
> ---
>  gdb/NEWS                    | 2 +-
>  gdb/dwarf2/index-write.c    | 2 +-
>  gdb/dwarf2/read-gdb-index.c | 8 ++++----
>  gdb/dwarf2/read.c           | 2 +-
>  gdb/dwarf2/read.h           | 6 +++---
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 08d779010f0..30b8cadf825 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,7 +3,7 @@
>  
>  *** Changes since GDB 14
>  
> -* GDB index now contains information about the main function. This speeds up
> +* GDB index now contains information about the main function.  This speeds up
>    startup when it is being used for some large binaries.
>  
>  * Python API

OK for the NEWS part, thanks.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
  
Tom Tromey Oct. 20, 2023, 5:24 p.m. UTC | #2
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> I noticed a few more style issues in commit 8b9c08eddac ("[gdb/symtab] Add
Tom> name_of_main and language_of_main to the DWARF index"), after checking it
Tom> with gcc's check_GNU_style.{sh,py}.

Tom> Fix these.

Tom> Build on x86_64-linux.

Thanks.
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  

Patch

diff --git a/gdb/NEWS b/gdb/NEWS
index 08d779010f0..30b8cadf825 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,7 +3,7 @@ 
 
 *** Changes since GDB 14
 
-* GDB index now contains information about the main function. This speeds up
+* GDB index now contains information about the main function.  This speeds up
   startup when it is being used for some large binaries.
 
 * Python API
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index bac4a6c6934..5ac7b10f89e 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1193,7 +1193,7 @@  write_cooked_index (cooked_index *table,
     }
 }
 
-/* Write shortcut information. */
+/* Write shortcut information.  */
 
 static void
 write_shortcuts_table (cooked_index *table, data_buf &shortcuts,
diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c
index 34c5dfd5803..e789e9c2654 100644
--- a/gdb/dwarf2/read-gdb-index.c
+++ b/gdb/dwarf2/read-gdb-index.c
@@ -88,7 +88,7 @@  struct mapped_gdb_index final : public mapped_index_base
   /* A pointer to the constant pool.  */
   gdb::array_view<const gdb_byte> constant_pool;
 
-  /* The shortcut table data. */
+  /* The shortcut table data.  */
   gdb::array_view<const gdb_byte> shortcut_table;
 
   /* Return the index into the constant pool of the name of the IDXth
@@ -771,7 +771,7 @@  create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile,
     = new (&per_bfd->obstack) addrmap_fixed (&per_bfd->obstack, &mutable_map);
 }
 
-/* Sets the name and language of the main function from the shortcut table. */
+/* Sets the name and language of the main function from the shortcut table.  */
 
 static void
 set_main_name_from_gdb_index (dwarf2_per_objfile *per_objfile,
@@ -780,7 +780,7 @@  set_main_name_from_gdb_index (dwarf2_per_objfile *per_objfile,
   const auto expected_size = 2 * sizeof (offset_type);
   if (index->shortcut_table.size () < expected_size)
     /* The data in the section is not present, is corrupted or is in a version
-       we don't know about. Regardless, we can't make use of it. */
+       we don't know about.  Regardless, we can't make use of it.  */
     return;
 
   auto ptr = index->shortcut_table.data ();
@@ -794,7 +794,7 @@  set_main_name_from_gdb_index (dwarf2_per_objfile *per_objfile,
   if (dw_lang == 0)
     {
       /* Don't bother if the language for the main symbol was not known or if
-	 there was no main symbol at all when the index was built. */
+	 there was no main symbol at all when the index was built.  */
       return;
     }
   ptr += 4;
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index c85eaac3035..4b18c1efb6f 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17819,7 +17819,7 @@  leb128_size (const gdb_byte *buf)
     }
 }
 
-/* Converts DWARF language names to GDB language names. */
+/* Converts DWARF language names to GDB language names.  */
 
 enum language
 dwarf_lang_to_enum_language (unsigned int lang)
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index c92474d8b9d..4acdcd5306f 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -246,11 +246,11 @@  struct dwarf2_per_cu_data
   std::vector <dwarf2_per_cu_data *> *imported_symtabs = nullptr;
 
   /* The original DW_LANG_* value of the CU, as provided to us by
-     DW_AT_language. It is interesting to keep this value around in cases where
+     DW_AT_language.  It is interesting to keep this value around in cases where
      we can't use the values from the language enum, as the mapping to them is
      lossy, and, while that is usually fine, things like the index have an
      understandable bias towards not exposing internal GDB structures to the
-     outside world, and so prefer to use DWARF constants in their stead. */
+     outside world, and so prefer to use DWARF constants in their stead.  */
   dwarf_source_language dw_lang;
 
   /* Return true of IMPORTED_SYMTABS is empty or not yet allocated.  */
@@ -772,7 +772,7 @@  struct dwarf2_per_objfile
 		     std::unique_ptr<dwarf2_cu>> m_dwarf2_cus;
 };
 
-/* Converts DWARF language names to GDB language names. */
+/* Converts DWARF language names to GDB language names.  */
 
 enum language dwarf_lang_to_enum_language (unsigned int lang);