mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 17:50:19 +02:00
LazDebuggerGdbmi: Add support "avr" filenames, ending in ".elf". Based on patch by Dimitrios Chr. Ioannidis
git-svn-id: trunk@61525 -
This commit is contained in:
parent
ba6f9cd2c8
commit
b132011820
@ -1884,6 +1884,7 @@ type
|
||||
procedure LockRelease; virtual;
|
||||
procedure UnlockRelease; virtual;
|
||||
function GetPseudoTerminal: TPseudoTerminal; virtual;
|
||||
property InternalFilename: string read FFileName write FFileName; //experimental
|
||||
public
|
||||
class function Caption: String; virtual; // The name of the debugger as shown in the debuggeroptions
|
||||
class function ExePaths: String; virtual; // The default locations of the exe
|
||||
|
@ -968,6 +968,7 @@ type
|
||||
|
||||
function CreateTypeRequestCache: TGDBPTypeRequestCache; virtual;
|
||||
property TypeRequestCache: TGDBPTypeRequestCache read FTypeRequestCache;
|
||||
property InternalFilename;
|
||||
public
|
||||
class function CreateProperties: TDebuggerProperties; override; // Creates debuggerproperties
|
||||
class function Caption: String; override;
|
||||
@ -2011,7 +2012,7 @@ function TGDBMIDebuggerChangeFilenameBase.DoChangeFilename: Boolean;
|
||||
var
|
||||
R: TGDBMIExecResult;
|
||||
List: TGDBMINameValueList;
|
||||
S: String;
|
||||
S, FileName: String;
|
||||
begin
|
||||
Result := False;
|
||||
FContext.ThreadContext := ccNotRequired;
|
||||
@ -2028,18 +2029,26 @@ begin
|
||||
FTheDebugger.FSehRaiseBreaks.ClearAll(Self);
|
||||
if DebuggerState = dsError then Exit;
|
||||
|
||||
S := FTheDebugger.ConvertToGDBPath(FTheDebugger.FileName, cgptExeName);
|
||||
FileName := FTheDebugger.FileName;
|
||||
S := FTheDebugger.ConvertToGDBPath(FileName, cgptExeName);
|
||||
Result := ExecuteCommand('-file-exec-and-symbols %s', [S], R);
|
||||
if not Result then exit;
|
||||
{$IFDEF darwin}
|
||||
if (R.State = dsError) and (FTheDebugger.FileName <> '')
|
||||
if (R.State = dsError) and (FileName <> '')
|
||||
then begin
|
||||
S := FTheDebugger.FileName + '/Contents/MacOS/' + ExtractFileNameOnly(FTheDebugger.FileName);
|
||||
S := FTheDebugger.InternalFilename + '/Contents/MacOS/' + ExtractFileNameOnly(Filename);
|
||||
S := FTheDebugger.ConvertToGDBPath(S, cgptExeName);
|
||||
Result := ExecuteCommand('-file-exec-and-symbols %s', [S], R);
|
||||
if not Result then exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
if (R.State = dsError) and (FileName <> '') then
|
||||
begin
|
||||
FTheDebugger.InternalFilename := Filename + '.elf';
|
||||
S := FTheDebugger.ConvertToGDBPath(FTheDebugger.FileName, cgptExeName);
|
||||
Result := ExecuteCommand('-file-exec-and-symbols %s', [S], R);
|
||||
if not Result then exit;
|
||||
end;
|
||||
|
||||
if (R.State = dsError) and (FTheDebugger.FileName <> '')
|
||||
then begin
|
||||
|
Loading…
Reference in New Issue
Block a user