Commit db5eedd
authored
[ORC] Tailor ELF debugger support plugin to load-address patching only (#168518)
In 4 years the ELF debugger support plugin wasn't adapted to other
object formats or debugging approaches. After the renaming NFC in
#168343, this patch tailors the
plugin to ELF and section load-address patching. It allows removal of
abstractions and consolidate processing steps with the newly enabled
AllocActions from #168343.
The key change is to process debug sections in one place in a
post-allocation pass. Since we can handle the endianness of the ELF file
the single `visitSectionLoadAddresses()` visitor function now, we don't
need to track debug objects and sections in template classes anymore. We
keep using the `DebugObject` class and drop `DebugObjectSection`,
`ELFDebugObjectSection<ELFT>` and `ELFDebugObject`.
Furthermore, we now use the allocation's working memory for load-address
fixups directly. We can drop the `WritableMemoryBuffer` from the debug
object and most of the `finalizeWorkingMemory()` step, which saves one
copy of the entire debug object buffer. Inlining `finalizeAsync()` into
the pre-fixup pass simplifies quite some logic.
We still track `RegisteredObjs` here, because we want to free memory
once the corresponding code is freed. There will be a follow-up patch
that turns it into a dealloc action.1 parent 6a5231e commit db5eedd
File tree
2 files changed
+227
-405
lines changed- llvm
- include/llvm/ExecutionEngine/Orc/Debugging
- lib/ExecutionEngine/Orc/Debugging
2 files changed
+227
-405
lines changedLines changed: 12 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
51 | | - | |
52 | | - | |
| 41 | + | |
53 | 42 | | |
54 | 43 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
59 | 47 | | |
60 | 48 | | |
61 | 49 | | |
62 | 50 | | |
63 | | - | |
64 | | - | |
| 51 | + | |
| 52 | + | |
65 | 53 | | |
66 | 54 | | |
67 | 55 | | |
68 | 56 | | |
69 | 57 | | |
70 | 58 | | |
71 | 59 | | |
72 | | - | |
| 60 | + | |
73 | 61 | | |
74 | 62 | | |
75 | 63 | | |
| |||
94 | 82 | | |
95 | 83 | | |
96 | 84 | | |
| 85 | + | |
| 86 | + | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
| |||
0 commit comments