Commit 3e1ae6bf authored by hjk's avatar hjk

Debugger: Make 'Jump to Address' work with LLDB

Change-Id: Iba288df0db85063146ed9dc09351844924e22bdc
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent f10a81b6
......@@ -1488,16 +1488,19 @@ class Dumper(DumperBase):
else:
self.reportData()
def executeJumpToLine(self, args):
def executeJumpToLocation(self, args):
frame = self.currentFrame()
self.report('state="stopped"')
if not frame:
self.reportStatus("No frame available.")
self.reportLocation()
return
bp = self.target.BreakpointCreateByLocation(
str(args["file"]), int(args["line"]))
isWatch = isinstance(bp, lldb.SBWatchpoint)
addr = args.get('address', 0)
if addr:
bp = self.target.BreakpointCreateByAddress(addr)
else:
bp = self.target.BreakpointCreateByLocation(
str(args['file']), int(args['line']))
if bp.GetNumLocations() == 0:
self.target.BreakpointDelete(bp.GetID())
self.reportStatus("No target location found.")
......
......@@ -378,8 +378,11 @@ void LldbEngine::executeJumpToLine(const ContextData &data)
{
resetLocation();
notifyInferiorRunRequested();
runCommand(Command("executeJumpToLine")
.arg("file", data.fileName).arg("line", data.lineNumber));
Command cmd("executeJumpToLocation");
cmd.arg("file", data.fileName);
cmd.arg("line", data.lineNumber);
cmd.arg("address", data.address);
runCommand(cmd);
}
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