[2/3] Remove gdb_index_unpack

Message ID 20250116-remove-a-class-v1-2-f0cfe6eb5c3a@adacore.com
State New
Headers
Series Remove mapped_index_base and slightly clean up DWARF reader |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Tom Tromey Jan. 16, 2025, 3:52 p.m. UTC
  gdb_index_unpack is not used and can be removed.  The include of
extract-store-integer.h is also no longer needed by this file.
---
 gdb/dwarf2/index-common.h | 10 ----------
 1 file changed, 10 deletions(-)
  

Comments

Andrew Burgess Jan. 16, 2025, 5:50 p.m. UTC | #1
Tom Tromey <tromey@adacore.com> writes:

> gdb_index_unpack is not used and can be removed.  The include of
> extract-store-integer.h is also no longer needed by this file.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


> ---
>  gdb/dwarf2/index-common.h | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/gdb/dwarf2/index-common.h b/gdb/dwarf2/index-common.h
> index b9e0a632508dea68403c0d686ea9d6c6d8b02bbc..ca377213edc78b00442b973cd5c4df3e3f5f1790 100644
> --- a/gdb/dwarf2/index-common.h
> +++ b/gdb/dwarf2/index-common.h
> @@ -20,7 +20,6 @@
>  #ifndef GDB_DWARF2_INDEX_COMMON_H
>  #define GDB_DWARF2_INDEX_COMMON_H
>  
> -#include "extract-store-integer.h"
>  #include "hashtab.h"
>  
>  /* The suffix for an index file.  */
> @@ -32,15 +31,6 @@
>     architecture-independent.  */
>  typedef uint32_t offset_type;
>  
> -/* Unpack a 32-bit little-endian value.  */
> -
> -static inline offset_type
> -gdb_index_unpack (const gdb_byte *value)
> -{
> -  return (offset_type) extract_unsigned_integer (value, sizeof (offset_type),
> -						 BFD_ENDIAN_LITTLE);
> -}
> -
>  /* The hash function for strings in the mapped index.  This is the same as
>     SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
>     implementation.  This is necessary because the hash function is tied to the
>
> -- 
> 2.47.1
  

Patch

diff --git a/gdb/dwarf2/index-common.h b/gdb/dwarf2/index-common.h
index b9e0a632508dea68403c0d686ea9d6c6d8b02bbc..ca377213edc78b00442b973cd5c4df3e3f5f1790 100644
--- a/gdb/dwarf2/index-common.h
+++ b/gdb/dwarf2/index-common.h
@@ -20,7 +20,6 @@ 
 #ifndef GDB_DWARF2_INDEX_COMMON_H
 #define GDB_DWARF2_INDEX_COMMON_H
 
-#include "extract-store-integer.h"
 #include "hashtab.h"
 
 /* The suffix for an index file.  */
@@ -32,15 +31,6 @@ 
    architecture-independent.  */
 typedef uint32_t offset_type;
 
-/* Unpack a 32-bit little-endian value.  */
-
-static inline offset_type
-gdb_index_unpack (const gdb_byte *value)
-{
-  return (offset_type) extract_unsigned_integer (value, sizeof (offset_type),
-						 BFD_ENDIAN_LITTLE);
-}
-
 /* The hash function for strings in the mapped index.  This is the same as
    SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
    implementation.  This is necessary because the hash function is tied to the