Commit 0a65589
committed
[lldb][Mach-O] Read dyld_all_image_infos addr from
Mach-O corefiles have LC_NOTE metadata, one LC_NOTE that lldb
recognizes is `main bin spec` which can specify that this is a
kernel corefile, userland corefile, or firmware/standalone corefile.
With a userland corefile, the LC_NOTE would specify the virtual
address of the dyld binary's Mach-O header. lldb would create a
Module from that in-memory binary, find the `dyld_all_image_infos`
object in dyld's DATA segment, and use that object to find all of
the binaries present in the corefile.
ProcessMachCore takes the metadata from this LC_NOTE and passes the
address to the DynamicLoader plugin via its `GetImageInfoAddress()`
method, so the DynamicLoader can find all of the binaries and load
them in the Target at their correct virtual addresses.
We have a corefile creator who would prefer to specify the address
of `dyld_all_image_infos` directly, instead of specifying the address
of dyld and parsing that to find the object. DynamicLoaderMacOSX,
the DynamicLoader plugin being used here, will accept either a
dyld virtual address or a `dyld_all_image_infos` virtual address
from ProcessMachCore, and do the correct thing with either value.
lldb's process save-core mach-o corefile reader will continue to
specify the virtual address of the dyld binary.
rdar://144322688main bin spec LC_NOTE1 parent 3c2ba68 commit 0a65589
File tree
4 files changed
+53
-12
lines changed- lldb
- include/lldb/Symbol
- source/Plugins
- ObjectFile/Mach-O
- Process/mach-core
4 files changed
+53
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5599 | 5599 | | |
5600 | 5600 | | |
5601 | 5601 | | |
5602 | | - | |
| 5602 | + | |
| 5603 | + | |
5603 | 5604 | | |
| 5605 | + | |
5604 | 5606 | | |
| 5607 | + | |
| 5608 | + | |
5605 | 5609 | | |
5606 | 5610 | | |
5607 | 5611 | | |
| |||
5669 | 5673 | | |
5670 | 5674 | | |
5671 | 5675 | | |
| 5676 | + | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
5672 | 5680 | | |
5673 | 5681 | | |
5674 | 5682 | | |
| |||
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
323 | 327 | | |
324 | 328 | | |
325 | 329 | | |
| |||
466 | 470 | | |
467 | 471 | | |
468 | 472 | | |
| 473 | + | |
469 | 474 | | |
470 | 475 | | |
471 | 476 | | |
| |||
507 | 512 | | |
508 | 513 | | |
509 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
510 | 521 | | |
511 | 522 | | |
512 | 523 | | |
| |||
515 | 526 | | |
516 | 527 | | |
517 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
518 | 534 | | |
519 | 535 | | |
520 | 536 | | |
| |||
763 | 779 | | |
764 | 780 | | |
765 | 781 | | |
766 | | - | |
767 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
768 | 792 | | |
769 | | - | |
| 793 | + | |
770 | 794 | | |
771 | | - | |
772 | | - | |
| 795 | + | |
| 796 | + | |
773 | 797 | | |
774 | | - | |
| 798 | + | |
775 | 799 | | |
776 | | - | |
777 | | - | |
| 800 | + | |
| 801 | + | |
778 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
779 | 808 | | |
780 | 809 | | |
781 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
0 commit comments