forked from OSchip/llvm-project
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
This commit is contained in:
parent
5e23e16c6c
commit
913b2d4fd3
|
@ -46,12 +46,10 @@ class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase):
|
|||
self.expect("\^done")
|
||||
|
||||
self.runCmd("-break-insert -f main")
|
||||
#FIXME main wasn't resolved
|
||||
#self.expect("\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
self.expect("\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
#FIXME main wasn't resolved, =breakpoint-created is treated as =breakpoint-modified
|
||||
self.expect("\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
#FIXME =breakpoint-created is treated as =breakpoint-modified
|
||||
#self.expect("=breakpoint-created,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
self.expect("=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
self.expect("=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
|
||||
|
||||
self.runCmd("-exec-run")
|
||||
self.expect("\^running")
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue