[1/2] gdb/dwarf: rename some functions to specify "dwo"
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Rename some functions to make it clearer that they are only relevany
when dealing with DWO files.
Change-Id: Ia0cd3320bf16ebdbdc3c09d7963f372e6679ef7c
---
gdb/dwarf2/read.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
base-commit: 7fa205d2fe280f331ff08de24198229fa864014f
Comments
On 4/11/25 22:38, Simon Marchi wrote:
> Rename some functions to make it clearer that they are only relevany
relevany -> relevant
> when dealing with DWO files.
>
With that typo fixed, LGTM.
Reviewed-By: Tom de Vries <tdevries@suse.de>
Thanks,
- Tom
> Change-Id: Ia0cd3320bf16ebdbdc3c09d7963f372e6679ef7c
> ---
> gdb/dwarf2/read.c | 25 +++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
> index 6e96afe65e16..7d6dfd03e272 100644
> --- a/gdb/dwarf2/read.c
> +++ b/gdb/dwarf2/read.c
> @@ -2383,14 +2383,14 @@ read_abbrev_offset (dwarf2_per_objfile *per_objfile,
> return (sect_offset) read_offset (abfd, info_ptr, offset_size);
> }
>
> -/* A helper for create_debug_types_hash_table. Read types from SECTION
> +/* A helper for create_dwo_debug_types_hash_table. Read types from SECTION
> and fill them into DWO_FILE's type unit hash table. It will process only
> type units, therefore DW_UT_type. */
>
> static void
> -create_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
> - dwo_file *dwo_file, dwarf2_section_info *section,
> - rcuh_kind section_kind)
> +create_dwo_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
> + dwo_file *dwo_file, dwarf2_section_info *section,
> + rcuh_kind section_kind)
> {
> struct objfile *objfile = per_objfile->objfile;
> struct dwarf2_section_info *abbrev_section;
> @@ -2479,12 +2479,12 @@ create_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
> Note: This function processes DWO files only, not DWP files. */
>
> static void
> -create_debug_types_hash_table
> +create_dwo_debug_types_hash_table
> (dwarf2_per_objfile *per_objfile, dwo_file *dwo_file,
> gdb::array_view<dwarf2_section_info> type_sections)
> {
> for (dwarf2_section_info §ion : type_sections)
> - create_debug_type_hash_table (per_objfile, dwo_file, §ion,
> + create_dwo_debug_type_hash_table (per_objfile, dwo_file, §ion,
> rcuh_kind::TYPE);
> }
>
> @@ -6308,7 +6308,7 @@ lookup_dwo_file (dwarf2_per_bfd *per_bfd, const char *dwo_name,
> Note: This function processes DWO files only, not DWP files. */
>
> static void
> -create_cus_hash_table (dwarf2_cu *cu, dwo_file &dwo_file)
> +create_dwo_cus_hash_table (dwarf2_cu *cu, dwo_file &dwo_file)
> {
> dwarf2_per_objfile *per_objfile = cu->per_objfile;
> struct objfile *objfile = per_objfile->objfile;
> @@ -7630,14 +7630,15 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name,
> dwarf2_locate_dwo_sections (per_objfile->objfile, dwo_file->dbfd.get (),
> sec, &dwo_file->sections);
>
> - create_cus_hash_table (cu, *dwo_file);
> + create_dwo_cus_hash_table (cu, *dwo_file);
>
> if (cu->header.version < 5)
> - create_debug_types_hash_table (per_objfile, dwo_file.get (),
> - dwo_file->sections.types);
> + create_dwo_debug_types_hash_table (per_objfile, dwo_file.get (),
> + dwo_file->sections.types);
> else
> - create_debug_type_hash_table (per_objfile, dwo_file.get (),
> - &dwo_file->sections.info, rcuh_kind::COMPILE);
> + create_dwo_debug_type_hash_table (per_objfile, dwo_file.get (),
> + &dwo_file->sections.info,
> + rcuh_kind::COMPILE);
>
> dwarf_read_debug_printf ("DWO file found: %s", dwo_name);
>
>
> base-commit: 7fa205d2fe280f331ff08de24198229fa864014f
@@ -2383,14 +2383,14 @@ read_abbrev_offset (dwarf2_per_objfile *per_objfile,
return (sect_offset) read_offset (abfd, info_ptr, offset_size);
}
-/* A helper for create_debug_types_hash_table. Read types from SECTION
+/* A helper for create_dwo_debug_types_hash_table. Read types from SECTION
and fill them into DWO_FILE's type unit hash table. It will process only
type units, therefore DW_UT_type. */
static void
-create_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
- dwo_file *dwo_file, dwarf2_section_info *section,
- rcuh_kind section_kind)
+create_dwo_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
+ dwo_file *dwo_file, dwarf2_section_info *section,
+ rcuh_kind section_kind)
{
struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *abbrev_section;
@@ -2479,12 +2479,12 @@ create_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
Note: This function processes DWO files only, not DWP files. */
static void
-create_debug_types_hash_table
+create_dwo_debug_types_hash_table
(dwarf2_per_objfile *per_objfile, dwo_file *dwo_file,
gdb::array_view<dwarf2_section_info> type_sections)
{
for (dwarf2_section_info §ion : type_sections)
- create_debug_type_hash_table (per_objfile, dwo_file, §ion,
+ create_dwo_debug_type_hash_table (per_objfile, dwo_file, §ion,
rcuh_kind::TYPE);
}
@@ -6308,7 +6308,7 @@ lookup_dwo_file (dwarf2_per_bfd *per_bfd, const char *dwo_name,
Note: This function processes DWO files only, not DWP files. */
static void
-create_cus_hash_table (dwarf2_cu *cu, dwo_file &dwo_file)
+create_dwo_cus_hash_table (dwarf2_cu *cu, dwo_file &dwo_file)
{
dwarf2_per_objfile *per_objfile = cu->per_objfile;
struct objfile *objfile = per_objfile->objfile;
@@ -7630,14 +7630,15 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name,
dwarf2_locate_dwo_sections (per_objfile->objfile, dwo_file->dbfd.get (),
sec, &dwo_file->sections);
- create_cus_hash_table (cu, *dwo_file);
+ create_dwo_cus_hash_table (cu, *dwo_file);
if (cu->header.version < 5)
- create_debug_types_hash_table (per_objfile, dwo_file.get (),
- dwo_file->sections.types);
+ create_dwo_debug_types_hash_table (per_objfile, dwo_file.get (),
+ dwo_file->sections.types);
else
- create_debug_type_hash_table (per_objfile, dwo_file.get (),
- &dwo_file->sections.info, rcuh_kind::COMPILE);
+ create_dwo_debug_type_hash_table (per_objfile, dwo_file.get (),
+ &dwo_file->sections.info,
+ rcuh_kind::COMPILE);
dwarf_read_debug_printf ("DWO file found: %s", dwo_name);