diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2023-02-02 00:49:29 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2023-02-02 00:49:29 -0800 |
commit | 53d8d3f0c19e1365fdbb78c5824fe1d7e3d13aa0 (patch) | |
tree | e52e1557f32d29d992620489873938c3613a9e3d /bfd | |
parent | 3e3e792a2931b973d5c9bc4fa79168dec8ab7730 (diff) | |
download | gdb-53d8d3f0c19e1365fdbb78c5824fe1d7e3d13aa0.zip gdb-53d8d3f0c19e1365fdbb78c5824fe1d7e3d13aa0.tar.gz gdb-53d8d3f0c19e1365fdbb78c5824fe1d7e3d13aa0.tar.bz2 |
bfd: use "stack trace" instead of "unwind" for SFrame
SFrame format is meant for generating stack traces only.
bfd/
* elf-bfd.h: Replace the use of "unwind" with "stack trace".
* elf-sframe.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfxx-x86.c: Likewise.
include/
* elf/common.h: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elf-bfd.h | 2 | ||||
-rw-r--r-- | bfd/elf-sframe.c | 11 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 2 | ||||
-rw-r--r-- | bfd/elfxx-x86.c | 8 |
4 files changed, 12 insertions, 11 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 2b7c574..dff1982 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -702,7 +702,7 @@ struct elf_link_hash_table /* Used by eh_frame code when editing .eh_frame. */ struct eh_frame_hdr_info eh_info; - /* Used to link unwind data in .sframe sections. */ + /* Used to link stack trace info in .sframe sections. */ struct sframe_enc_info sfe_info; /* A linked list of local symbols to be added to .dynsym. */ diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c index 8a7fd02..d2954ba 100644 --- a/bfd/elf-sframe.c +++ b/bfd/elf-sframe.c @@ -206,7 +206,7 @@ _bfd_elf_parse_sframe (bfd *abfd, return false; } - /* Read the SFrame unwind information from abfd. */ + /* Read the SFrame stack trace information from abfd. */ if (!bfd_malloc_and_get_section (abfd, sec, &sfbuf)) goto fail_no_free; @@ -438,10 +438,11 @@ _bfd_elf_merge_section_sframe (bfd *abfd, } else { - /* Expected to land here for SFrame unwind info as created - for the .plt* sections. These sections can have upto two - FDE entries. Although the code should work for > 2, - leaving this assert here for safety. */ + /* Expected to land here when SFrame stack trace info is + created dynamically for the .plt* sections. These + sections are expected to have upto two SFrame FDE entries. + Although the code should work for > 2, leaving this + assert here for safety. */ BFD_ASSERT (num_fidx <= 2); /* For the first entry, we know the offset of the SFrame FDE's sfde_func_start_address. Side note: see how the value diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 914f82d..5f89190 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -895,7 +895,7 @@ static const struct elf_x86_sframe_plt elf_x86_64_sframe_plt = { &elf_x86_64_sframe_pltn_fre1, &elf_x86_64_sframe_pltn_fre2 }, NON_LAZY_PLT_ENTRY_SIZE, 1, /* Number of FREs for PLTn for second PLT. */ - /* FREs for second plt ( unwind info for .plt.got is + /* FREs for second plt (stack trace info for .plt.got is identical). Used when IBT or non-lazy PLT is in effect. */ { &elf_x86_64_sframe_sec_pltn_fre1 } }; diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index 42af84b..132fb79 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -1804,7 +1804,7 @@ enum dynobj_sframe_plt_type SFRAME_PLT_SEC = 2 }; -/* Create SFrame unwind info for the plt entries in the .plt section +/* Create SFrame stack trace info for the plt entries in the .plt section of type PLT_SEC_TYPE. */ static bool @@ -1819,7 +1819,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd, unsigned int plt0_entry_size; unsigned char func_info; unsigned int fre_type; - /* The dynamic plt section for which .sframe unwind information is being + /* The dynamic plt section for which .sframe stack trace information is being created. */ asection *dpltsec; @@ -1832,7 +1832,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd, bed = get_elf_backend_data (output_bfd); htab = elf_x86_hash_table (info, bed->target_id); - /* Whether SFrame unwind info for plt0 is to be generated. */ + /* Whether SFrame stack trace info for plt0 is to be generated. */ plt0_generated_p = htab->plt.has_plt0; plt0_entry_size = (plt0_generated_p) ? htab->sframe_plt->plt0_entry_size : 0; @@ -1906,7 +1906,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd, /* pltn entries use an SFrame FDE of type SFRAME_FDE_TYPE_PCMASK to exploit the repetitive pattern of the instructions in these entries. Using this SFrame FDE - type helps in keeping the unwind information for pltn entries + type helps in keeping the SFrame stack trace info for pltn entries compact. */ func_info = sframe_fde_create_func_info (fre_type, SFRAME_FDE_TYPE_PCMASK); |