eddyz87
3ca17443ef
[DebugInfo][BPF] Add 'annotations' field for DIBasicType & DISubroutineType ( #91422 )
...
Extend `DIBasicType` and `DISubroutineType` with additional field
`annotations`, e.g. as below:
```
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed, annotations: !6 )
!6 = !{!7}
!7 = !{!"btf:type_tag", !"tag1"}
```
The field would be used by BPF backend to generate DWARF attributes
corresponding to `btf_type_tag` type attributes, e.g.:
```
0x00000029: DW_TAG_base_type
DW_AT_name ("int")
DW_AT_encoding (DW_ATE_signed)
DW_AT_byte_size (0x04)
0x0000002d: DW_TAG_LLVM_annotation
DW_AT_name ("btf:type_tag")
DW_AT_const_value ("tag1")
```
Such DWARF entries would be used to generate BTF definitions by tools
like [pahole](https://github.com/acmel/dwarves ).
Note: similar fields with similar purposes are already present in
DIDerivedType and DICompositeType.
Currently "btf_type_tag" attributes are represented in debug information
as 'annotations' fields in DIDerivedType with DW_TAG_pointer_type tag.
The annotation on a pointer corresponds to pointee having the attributes
in the final BTF.
The discussion in
[thread](https://lore.kernel.org/bpf/87r0w9jjoq.fsf@oracle.com/ ) came to
conclusion, that such annotations should apply to the annotated type
itself. Hence the necessity to extend `DIBasicType` & `DISubroutineType`
types with 'annotations' field to represent cases like below:
```
int __attribute__((btf_type_tag("foo"))) bar;
```
This was previously tracked as differential revision:
https://reviews.llvm.org/D143966
2024-06-18 10:23:25 +03:00
..
2023-10-05 14:38:25 +02:00
2023-06-20 16:43:14 +02:00
2022-12-14 13:38:20 +01:00
2022-01-18 14:08:36 -05:00
2023-08-10 17:38:25 -04:00
2023-09-13 08:38:48 +03:00
2022-03-16 14:11:53 -07:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2024-06-18 10:23:25 +03:00
2024-06-18 10:23:25 +03:00
2021-11-05 11:25:17 -07:00
2022-12-14 13:38:20 +01:00
2024-04-15 09:54:37 +09:00
2022-12-19 15:22:39 +08:00
2022-07-04 16:41:40 +02:00
2022-12-13 12:24:05 +01:00
2022-05-10 16:03:42 -07:00
2022-05-10 16:03:42 -07:00
2022-05-10 16:03:42 -07:00
2022-05-10 16:03:42 -07:00
2022-04-12 11:38:35 -07:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-07-11 16:46:21 +02:00
2023-06-20 16:43:14 +02:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-03-27 11:41:34 +00:00
2024-06-10 17:53:22 -07:00
2024-02-22 14:07:16 +00:00
2022-12-14 13:38:20 +01:00
2023-03-14 16:48:33 +00:00
2023-03-06 18:34:32 +00:00
2024-06-14 15:07:27 +01:00
2024-06-14 15:07:27 +01:00
2022-09-07 12:47:21 +02:00
2022-09-07 12:47:21 +02:00
2023-07-12 12:31:42 +05:30
2023-07-12 12:31:42 +05:30
2022-12-14 13:38:20 +01:00
2024-06-14 15:07:27 +01:00
2024-04-05 14:18:59 +01:00
2024-06-14 15:07:27 +01:00
2023-06-16 00:49:59 +02:00
2023-06-16 00:49:59 +02:00
2022-01-26 11:56:57 -05:00
2022-01-26 11:56:57 -05:00
2022-12-02 17:12:03 -05:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-09 01:04:45 +03:00
2024-04-09 18:12:33 -05:00
2022-12-14 13:38:20 +01:00
2023-01-12 10:10:45 +01:00
2021-11-25 07:21:42 -05:00
2023-06-20 16:43:14 +02:00
2022-12-19 11:23:17 +01:00
2022-12-19 11:23:17 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-09 01:04:45 +03:00
2022-12-14 13:38:20 +01:00
2022-03-30 09:51:24 +02:00
2022-12-14 13:38:20 +01:00
2022-02-07 12:28:15 +01:00
2023-07-12 14:35:55 +02:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2023-07-12 12:31:42 +05:30
2022-11-04 10:21:38 +01:00
2022-11-04 10:21:38 +01:00
2023-07-12 14:35:55 +02:00
2022-12-14 13:38:20 +01:00
2024-05-06 21:37:07 +08:00
2022-12-14 13:38:20 +01:00
2023-12-06 08:41:44 -08:00
2024-05-06 21:37:07 +08:00
2023-12-06 08:41:44 -08:00
2024-05-06 21:37:07 +08:00
2023-12-06 08:41:44 -08:00
2024-05-06 21:37:07 +08:00
2024-05-06 21:37:07 +08:00
2024-05-06 21:37:07 +08:00
2024-04-10 19:46:01 -07:00
2024-05-06 21:37:07 +08:00
2024-05-06 21:37:07 +08:00
2023-12-06 08:41:44 -08:00
2024-05-06 21:37:07 +08:00
2024-05-06 21:37:07 +08:00
2024-04-10 19:46:01 -07:00
2024-03-27 11:41:34 +00:00
2024-04-10 19:46:01 -07:00
2023-12-06 08:41:44 -08:00
2022-12-14 13:38:20 +01:00
2023-12-06 08:41:44 -08:00
2024-04-10 19:46:01 -07:00
2024-04-10 19:46:01 -07:00
2022-03-14 10:09:59 -07:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-07 18:29:18 +00:00
2022-12-14 13:38:20 +01:00
2022-05-20 15:27:29 -07:00
2022-12-14 13:38:20 +01:00
2024-02-23 10:24:15 +01:00
2022-04-13 09:31:51 +02:00
2024-01-16 17:01:01 -08:00
2024-01-16 17:01:01 -08:00
2023-10-11 10:23:38 +01:00
2023-10-11 10:23:38 +01:00
2023-10-11 10:23:38 +01:00
2023-10-11 10:23:38 +01:00
2023-10-11 10:23:38 +01:00
2024-06-14 15:07:27 +01:00
2023-03-02 09:29:42 +00:00
2024-06-14 15:07:27 +01:00
2022-12-14 13:38:20 +01:00
2022-11-04 10:21:38 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2024-04-11 12:29:29 -07:00
2022-12-14 13:38:20 +01:00
2022-01-06 15:13:01 +01:00
2022-12-19 11:23:17 +01:00
2022-12-19 11:23:17 +01:00
2022-12-19 11:23:17 +01:00
2024-03-06 09:51:48 -05:00
2022-08-18 16:28:55 -07:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-12-14 13:38:20 +01:00
2022-06-27 10:48:45 +00:00
2022-06-27 10:48:45 +00:00
2024-04-29 10:16:45 +01:00
2024-04-29 10:16:45 +01:00
2024-04-29 10:16:45 +01:00
2024-05-28 16:09:53 +02:00
2024-05-28 16:09:53 +02:00
2024-03-27 11:41:34 +00:00
2024-06-04 08:31:03 +02:00
2022-12-14 13:38:20 +01:00
2023-06-20 16:43:14 +02:00