Commit 427c32cc authored by hjk's avatar hjk

Debugger: Fix Jump To Address in LLDB disassembler on Linux

lldb.thread.RunToAddress does not seem to hit anything on Linux.
Fake it by setting a temporary breakpoint + continue.

Change-Id: I533c8fb42c9a3d1ac1e5cc23eae8162a3455fb9a
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 5dab51ce
......@@ -1592,18 +1592,27 @@ class Dumper(DumperBase):
self.reportToken(args)
addr = args.get('address', 0)
if addr:
error = self.currentThread().RunToAddress(addr)
# Does not seem to hit anything on Linux:
# self.currentThread().RunToAddress(addr)
bp = self.target.BreakpointCreateByAddress(addr)
if bp.GetNumLocations() == 0:
self.target.BreakpointDelete(bp.GetID())
self.reportStatus("No target location found.")
self.reportLocation(frame)
return
bp.SetOneShot(True)
self.process.Continue()
else:
frame = self.currentFrame()
file = args['file']
line = int(args['line'])
error = self.currentThread().StepOverUntil(frame, lldb.SBFileSpec(file), line)
if error.GetType():
self.reportState("running")
self.reportState("stopped")
self.reportError(error)
else:
self.reportData()
if error.GetType():
self.reportState("running")
self.reportState("stopped")
self.reportError(error)
else:
self.reportData()
def executeJumpToLocation(self, args):
self.reportToken(args)
......
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