summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
diff options
context:
space:
mode:
authorIlia K <ki.stfu@gmail.com>2015-05-08 12:06:17 +0000
committerIlia K <ki.stfu@gmail.com>2015-05-08 12:06:17 +0000
commit913b2d4fd36e086b59d0f619bd234caed1fd7849 (patch)
treec2741a99c4e176520a459ff82d5245640b6ff0fa /lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
parent5e23e16c6c9c5b966acca1311510a141ee21ab2c (diff)
downloadbcm5719-llvm-913b2d4fd36e086b59d0f619bd234caed1fd7849.tar.gz
bcm5719-llvm-913b2d4fd36e086b59d0f619bd234caed1fd7849.zip
Fix BP address for local symbols if target not launched (MI)
For example: was: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert -f main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",pending=["main"],times="0",original-location="main"} ``` now: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert -f main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",pending=["main"],times="0",original-location="main"} ``` llvm-svn: 236830
Diffstat (limited to 'lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
index ca788108857..13abefee0bf 100644
--- a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
@@ -803,7 +803,9 @@ CMICmnLLDBDebugSessionInfo::GetBrkPtInfo(const lldb::SBBreakpoint &vBrkPt, SBrkP
const MIchar *pFn = pUnkwn;
const MIchar *pFilePath = pUnkwn;
size_t nLine = 0;
- const size_t nAddr = brkPtAddr.GetLoadAddress(GetTarget());
+ lldb::addr_t nAddr = brkPtAddr.GetLoadAddress(GetTarget());
+ if (nAddr == LLDB_INVALID_ADDRESS)
+ nAddr = brkPtAddr.GetFileAddress();
lldb::SBCompileUnit rCmplUnit = symbolCntxt.GetCompileUnit();
if (rCmplUnit.IsValid())
OpenPOWER on IntegriCloud