mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 12:19:28 +02:00
Debugger: Try filename in app bundle for newer gdb
git-svn-id: trunk@43240 -
This commit is contained in:
parent
3a38088ecf
commit
4f8bfb32e9
@ -2596,6 +2596,7 @@ function TGDBMIDebuggerCommandChangeFilename.DoExecute: Boolean;
|
|||||||
var
|
var
|
||||||
R: TGDBMIExecResult;
|
R: TGDBMIExecResult;
|
||||||
List: TGDBMINameValueList;
|
List: TGDBMINameValueList;
|
||||||
|
S: String;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
FSuccess := False;
|
FSuccess := False;
|
||||||
@ -2608,8 +2609,18 @@ begin
|
|||||||
FTheDebugger.FRunErrorBreak.Clear(Self);
|
FTheDebugger.FRunErrorBreak.Clear(Self);
|
||||||
if DebuggerState = dsError then Exit;
|
if DebuggerState = dsError then Exit;
|
||||||
|
|
||||||
FSuccess := ExecuteCommand('-file-exec-and-symbols %s', [FFileName], R);
|
S := FTheDebugger.ConvertToGDBPath(UTF8ToSys(FFileName), cgptExeName);
|
||||||
|
FSuccess := ExecuteCommand('-file-exec-and-symbols %s', [S], R);
|
||||||
if not FSuccess then exit;
|
if not FSuccess then exit;
|
||||||
|
{$IFDEF darwin}
|
||||||
|
if (R.State = dsError) and (FFileName <> '')
|
||||||
|
then begin
|
||||||
|
FFileName := FFileName + '/Contents/MacOS/' + ExtractFileNameOnly(FFileName);
|
||||||
|
S := FTheDebugger.ConvertToGDBPath(UTF8ToSys(FFileName), cgptExeName);
|
||||||
|
FSuccess := ExecuteCommand('-file-exec-and-symbols %s', [S], R);
|
||||||
|
if not FSuccess then exit;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
if (R.State = dsError) and (FFileName <> '')
|
if (R.State = dsError) and (FFileName <> '')
|
||||||
then begin
|
then begin
|
||||||
@ -7002,15 +7013,13 @@ end;
|
|||||||
|
|
||||||
function TGDBMIDebugger.ChangeFileName: Boolean;
|
function TGDBMIDebugger.ChangeFileName: Boolean;
|
||||||
var
|
var
|
||||||
S: String;
|
|
||||||
Cmd: TGDBMIDebuggerCommandChangeFilename;
|
Cmd: TGDBMIDebuggerCommandChangeFilename;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
FCurrentStackFrameValid := False; // not running => not valid
|
FCurrentStackFrameValid := False; // not running => not valid
|
||||||
FCurrentThreadIdValid := False;
|
FCurrentThreadIdValid := False;
|
||||||
S := ConvertToGDBPath(UTF8ToSys(FileName), cgptExeName);
|
|
||||||
|
|
||||||
Cmd := TGDBMIDebuggerCommandChangeFilename.Create(Self, S);
|
Cmd := TGDBMIDebuggerCommandChangeFilename.Create(Self, FileName);
|
||||||
Cmd.AddReference;
|
Cmd.AddReference;
|
||||||
QueueCommand(Cmd);
|
QueueCommand(Cmd);
|
||||||
// if filename = '', then command may be queued
|
// if filename = '', then command may be queued
|
||||||
|
Loading…
Reference in New Issue
Block a user