diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-11-30 18:13:34 +0000 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2024-01-08 18:35:25 +0000 |
commit | 4a5bb8bc1c562ba4d6e97f1979de6b8ac566f04f (patch) | |
tree | 5fb4bbde87174159db5f07727ee9e99a7675a8b6 /gcc | |
parent | a17299c17afeb92a56ef716d2d6380c8538493c4 (diff) | |
download | gcc-4a5bb8bc1c562ba4d6e97f1979de6b8ac566f04f.zip gcc-4a5bb8bc1c562ba4d6e97f1979de6b8ac566f04f.tar.gz gcc-4a5bb8bc1c562ba4d6e97f1979de6b8ac566f04f.tar.bz2 |
btf: print string offset in comment
When using -dA, this function was only printing as comment btf_string or
btf_aux_string.
This patch changes the comment to also include the position of the
string within the section in hexadecimal format.
gcc/ChangeLog:
* btfout.cc (output_btf_strs): Changed.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/btfout.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/btfout.cc b/gcc/btfout.cc index bf3183d..669d357d 100644 --- a/gcc/btfout.cc +++ b/gcc/btfout.cc @@ -1105,17 +1105,20 @@ static void output_btf_strs (ctf_container_ref ctfc) { ctf_string_t * ctf_string = ctfc->ctfc_strtable.ctstab_head; + static int str_pos = 0; while (ctf_string) { - dw2_asm_output_nstring (ctf_string->cts_str, -1, "btf_string"); + dw2_asm_output_nstring (ctf_string->cts_str, -1, "btf_string, str_pos = 0x%x", str_pos); + str_pos += strlen(ctf_string->cts_str) + 1; ctf_string = ctf_string->cts_next; } ctf_string = ctfc->ctfc_aux_strtable.ctstab_head; while (ctf_string) { - dw2_asm_output_nstring (ctf_string->cts_str, -1, "btf_aux_string"); + dw2_asm_output_nstring (ctf_string->cts_str, -1, "btf_aux_string, str_pos = 0x%x", str_pos); + str_pos += strlen(ctf_string->cts_str) + 1; ctf_string = ctf_string->cts_next; } } |