Commit 282e688d authored by hjk's avatar hjk

Debugger: Fix "Jump to Line" for LLDB

Change-Id: I2fa58fd0db85063146ed9dc09351844924e22bdc
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent cbf76068
......@@ -1466,8 +1466,23 @@ class Dumper(DumperBase):
self.thread.StepOverUntil(file, line)
self.reportData()
def executeJumpToLine(self):
self.report('error={msg="Not implemented"},state="stopped"')
def executeJumpToLine(self, args):
frame = self.currentFrame()
self.report('state="stopped"')
if not frame:
self.report('error={msg="No frame"}')
return
bp = self.target.BreakpointCreateByLocation(
str(args["file"]), int(args["line"]))
isWatch = isinstance(bp, lldb.SBWatchpoint)
if bp.GetNumLocations() == 0:
self.report('error={msg="No location implemented"}')
self.target.BreakpointDelete(bp.GetID())
return
loc = bp.GetLocationAtIndex(0)
self.target.BreakpointDelete(bp.GetID())
frame.SetPC(loc.GetLoadAddress())
self.reportData()
def breakList(self):
result = lldb.SBCommandReturnObject()
......
......@@ -370,7 +370,7 @@ void LldbEngine::executeJumpToLine(const ContextData &data)
resetLocation();
notifyInferiorRunRequested();
runCommand(Command("executeJumpToLine")
.arg("file", data.fileName).arg("line", data.address));
.arg("file", data.fileName).arg("line", data.lineNumber));
}
void LldbEngine::activateFrame(int frameIndex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment