mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:49:17 +02:00
* fixed Run->"Until return" in the GDB/MI debugger
git-svn-id: trunk@29717 -
This commit is contained in:
parent
a939ea06b6
commit
8f9c062e4d
@ -1014,7 +1014,7 @@ end;
|
|||||||
|
|
||||||
procedure TDebugController.UntilReturn;
|
procedure TDebugController.UntilReturn;
|
||||||
begin
|
begin
|
||||||
Command('finish');
|
inherited UntilReturn;
|
||||||
UpdateDebugViews;
|
UpdateDebugViews;
|
||||||
{ We could try to get the return value !
|
{ We could try to get the return value !
|
||||||
Not done yet }
|
Not done yet }
|
||||||
|
@ -47,6 +47,7 @@ type
|
|||||||
procedure TraceStepI;
|
procedure TraceStepI;
|
||||||
procedure TraceNextI;
|
procedure TraceNextI;
|
||||||
procedure Continue; virtual;
|
procedure Continue; virtual;
|
||||||
|
procedure UntilReturn; virtual;
|
||||||
function LoadFile(var fn: string): Boolean;
|
function LoadFile(var fn: string): Boolean;
|
||||||
procedure SetDir(const s: string);
|
procedure SetDir(const s: string);
|
||||||
procedure SetArgs(const s: string);
|
procedure SetArgs(const s: string);
|
||||||
@ -155,6 +156,13 @@ begin
|
|||||||
WaitForProgramStop;
|
WaitForProgramStop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGDBController.UntilReturn;
|
||||||
|
begin
|
||||||
|
UserScreen;
|
||||||
|
Command('-exec-finish');
|
||||||
|
WaitForProgramStop;
|
||||||
|
end;
|
||||||
|
|
||||||
function TGDBController.LoadFile(var fn: string): Boolean;
|
function TGDBController.LoadFile(var fn: string): Boolean;
|
||||||
var
|
var
|
||||||
cmd: string;
|
cmd: string;
|
||||||
|
@ -291,6 +291,13 @@ begin
|
|||||||
current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
|
current_pc := GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['addr'].AsPtrInt;
|
||||||
DoSelectSourceLine(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname'].AsString, GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['line'].AsLongInt);
|
DoSelectSourceLine(GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['fullname'].AsString, GDB.ExecAsyncOutput.Parameters['frame'].AsTuple['line'].AsLongInt);
|
||||||
end;
|
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':
|
'exited':
|
||||||
begin
|
begin
|
||||||
DebuggerScreen;
|
DebuggerScreen;
|
||||||
|
@ -47,6 +47,7 @@ type
|
|||||||
procedure TraceStepI;virtual;
|
procedure TraceStepI;virtual;
|
||||||
procedure TraceNextI;virtual;
|
procedure TraceNextI;virtual;
|
||||||
procedure Continue;virtual;
|
procedure Continue;virtual;
|
||||||
|
procedure UntilReturn;virtual;
|
||||||
{ needed for dos because newlines are only #10 (PM) }
|
{ needed for dos because newlines are only #10 (PM) }
|
||||||
procedure WriteErrorBuf;
|
procedure WriteErrorBuf;
|
||||||
procedure WriteOutputBuf;
|
procedure WriteOutputBuf;
|
||||||
@ -295,6 +296,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TGDBController.UntilReturn;
|
||||||
|
begin
|
||||||
|
Command('finish');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TGDBController.ClearSymbols;
|
procedure TGDBController.ClearSymbols;
|
||||||
begin
|
begin
|
||||||
if debuggee_started then
|
if debuggee_started then
|
||||||
|
Loading…
Reference in New Issue
Block a user