diff options
| author | Ilia K <ki.stfu@gmail.com> | 2015-05-08 12:06:17 +0000 |
|---|---|---|
| committer | Ilia K <ki.stfu@gmail.com> | 2015-05-08 12:06:17 +0000 |
| commit | 913b2d4fd36e086b59d0f619bd234caed1fd7849 (patch) | |
| tree | c2741a99c4e176520a459ff82d5245640b6ff0fa | |
| parent | 5e23e16c6c9c5b966acca1311510a141ee21ab2c (diff) | |
| download | bcm5719-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
| -rw-r--r-- | lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py | 8 | ||||
| -rw-r--r-- | lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py index 5ecf9d210c7..89479e138ff 100644 --- a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py +++ b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py @@ -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") 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()) |

