File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
source/Plugins/DynamicLoader/MacOSX-DYLD Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 9
9
#ifndef LLDB_TARGET_DYNAMICLOADER_H
10
10
#define LLDB_TARGET_DYNAMICLOADER_H
11
11
12
+ #include " lldb/Core/Address.h"
12
13
#include " lldb/Core/PluginInterface.h"
13
- #include " lldb/Symbol/Symbol.h"
14
14
#include " lldb/Utility/FileSpec.h"
15
15
#include " lldb/Utility/Status.h"
16
16
#include " lldb/Utility/UUID.h"
@@ -25,6 +25,7 @@ namespace lldb_private {
25
25
class ModuleList ;
26
26
class Process ;
27
27
class SectionList ;
28
+ class Symbol ;
28
29
class SymbolContext ;
29
30
class SymbolContextList ;
30
31
class Thread ;
@@ -329,10 +330,10 @@ class DynamicLoader : public PluginInterface {
329
330
// / safe to call certain APIs or SPIs.
330
331
virtual bool IsFullyInitialized () { return true ; }
331
332
332
- // / Return the `start` function \b symbol in the dynamic loader module.
333
- // / This is the symbol the process will begin executing with
333
+ // / Return the `start` \b address in the dynamic loader module.
334
+ // / This is the address the process will begin executing with
334
335
// / `process launch --stop-at-entry`.
335
- virtual std::optional<lldb_private::Symbol> GetStartSymbol () {
336
+ virtual std::optional<lldb_private::Address> GetStartAddress () {
336
337
return std::nullopt;
337
338
}
338
339
Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ void DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(
609
609
}
610
610
}
611
611
612
- std::optional<lldb_private::Symbol > DynamicLoaderDarwin::GetStartSymbol () {
612
+ std::optional<lldb_private::Address > DynamicLoaderDarwin::GetStartAddress () {
613
613
Log *log = GetLog (LLDBLog::DynamicLoader);
614
614
615
615
auto log_err = [log](llvm::StringLiteral err_msg) -> std::nullopt_t {
@@ -626,7 +626,7 @@ std::optional<lldb_private::Symbol> DynamicLoaderDarwin::GetStartSymbol() {
626
626
if (!symbol)
627
627
return log_err (" Cannot find `start` symbol in DYLD module." );
628
628
629
- return * symbol;
629
+ return symbol-> GetAddress () ;
630
630
}
631
631
632
632
void DynamicLoaderDarwin::SetDYLDModule (lldb::ModuleSP &dyld_module_sp) {
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ class DynamicLoaderDarwin : public lldb_private::DynamicLoader {
56
56
57
57
virtual bool NeedToDoInitialImageFetch () = 0;
58
58
59
+ std::optional<lldb_private::Address> GetStartAddress () override ;
60
+
59
61
protected:
60
62
void PrivateInitialize (lldb_private::Process *process);
61
63
@@ -67,8 +69,6 @@ class DynamicLoaderDarwin : public lldb_private::DynamicLoader {
67
69
// Clear method for classes derived from this one
68
70
virtual void DoClear () = 0;
69
71
70
- std::optional<lldb_private::Symbol> GetStartSymbol () override ;
71
-
72
72
void SetDYLDModule (lldb::ModuleSP &dyld_module_sp);
73
73
74
74
lldb::ModuleSP GetDYLDModule ();
You can’t perform that action at this time.
0 commit comments