* fixed Run->"Until return" in the GDB/MI debugger

git-svn-id: trunk@29717 -
This commit is contained in:
nickysn 2015-02-16 02:25:53 +00:00
parent a939ea06b6
commit 8f9c062e4d
4 changed files with 23 additions and 1 deletions

View File

@ -1014,7 +1014,7 @@ end;
procedure TDebugController.UntilReturn;
begin
Command('finish');
inherited UntilReturn;
UpdateDebugViews;
{ We could try to get the return value !
Not done yet }

View File

@ -47,6 +47,7 @@ type
procedure TraceStepI;
procedure TraceNextI;
procedure Continue; virtual;
procedure UntilReturn; virtual;
function LoadFile(var fn: string): Boolean;
procedure SetDir(const s: string);
procedure SetArgs(const s: string);
@ -155,6 +156,13 @@ begin
WaitForProgramStop;
end;
procedure TGDBController.UntilReturn;
begin
UserScreen;
Command('-exec-finish');
WaitForProgramStop;
end;
function TGDBController.LoadFile(var fn: string): Boolean;
var
cmd: string;

View File

@ -291,6 +291,13 @@ begin
current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
DoSelectSourceLine(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname'].AsString, GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['line'].AsLongInt);
end;
'function-finished':
begin
DebuggerScreen;
Debuggee_started := True;
current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
DoSelectSourceLine(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname'].AsString, GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['line'].AsLongInt);
end;
'exited':
begin
DebuggerScreen;

View File

@ -47,6 +47,7 @@ type
procedure TraceStepI;virtual;
procedure TraceNextI;virtual;
procedure Continue;virtual;
procedure UntilReturn;virtual;
{ needed for dos because newlines are only #10 (PM) }
procedure WriteErrorBuf;
procedure WriteOutputBuf;
@ -295,6 +296,12 @@ begin
end;
procedure TGDBController.UntilReturn;
begin
Command('finish');
end;
procedure TGDBController.ClearSymbols;
begin
if debuggee_started then