mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 23:56:19 +02:00
Change PtrUInt to TDbgPtr to be consistent with FpDbgClasses unit
git-svn-id: trunk@62759 -
This commit is contained in:
parent
93ee5eb352
commit
8ac43cbd8d
@ -51,7 +51,7 @@ type
|
|||||||
FIsSteppingBreakPoint: boolean;
|
FIsSteppingBreakPoint: boolean;
|
||||||
FDidResetInstructionPointer: Boolean;
|
FDidResetInstructionPointer: Boolean;
|
||||||
FHasThreadState: boolean;
|
FHasThreadState: boolean;
|
||||||
function ReadDebugReg(ind: byte; out AVal: PtrUInt): boolean;
|
function ReadDebugReg(ind: byte; out AVal: TDbgPtr): boolean;
|
||||||
function WriteDebugReg(ind: byte; AVal: PtrUInt): boolean;
|
function WriteDebugReg(ind: byte; AVal: PtrUInt): boolean;
|
||||||
|
|
||||||
// Cache registers if reported in event
|
// Cache registers if reported in event
|
||||||
@ -226,7 +226,7 @@ procedure TDbgAvrProcess.OnForkEvent(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDbgAvrThread.ReadDebugReg(ind: byte; out AVal: PtrUInt): boolean;
|
function TDbgAvrThread.ReadDebugReg(ind: byte; out AVal: TDbgPtr): boolean;
|
||||||
begin
|
begin
|
||||||
if TDbgAvrProcess(Process).FIsTerminating or (TDbgAvrProcess(Process).FStatus = SIGHUP) then
|
if TDbgAvrProcess(Process).FIsTerminating or (TDbgAvrProcess(Process).FStatus = SIGHUP) then
|
||||||
begin
|
begin
|
||||||
|
@ -100,8 +100,8 @@ type
|
|||||||
function SingleStep(): boolean;
|
function SingleStep(): boolean;
|
||||||
|
|
||||||
// Data exchange
|
// Data exchange
|
||||||
function ReadDebugReg(ind: byte; out AVal: PtrUInt): boolean;
|
function ReadDebugReg(ind: byte; out AVal: TDbgPtr): boolean;
|
||||||
function WriteDebugReg(ind: byte; AVal: PtrUInt): boolean;
|
function WriteDebugReg(ind: byte; AVal: TDbgPtr): boolean;
|
||||||
function ReadRegisters(out regs; const sz: integer): boolean; // size is not required by protocol, but is used to preallocate memory for the response
|
function ReadRegisters(out regs; const sz: integer): boolean; // size is not required by protocol, but is used to preallocate memory for the response
|
||||||
function WriteRegisters(constref regs; const sz: integer): boolean;
|
function WriteRegisters(constref regs; const sz: integer): boolean;
|
||||||
function ReadData(const AAddress: TDbgPtr; const ASize: cardinal; out AData
|
function ReadData(const AAddress: TDbgPtr; const ASize: cardinal; out AData
|
||||||
@ -590,20 +590,24 @@ begin
|
|||||||
DebugLn(DBG_WARNINGS, ['Warning: SingleStep command failure in TRspConnection.SingleStep()']);
|
DebugLn(DBG_WARNINGS, ['Warning: SingleStep command failure in TRspConnection.SingleStep()']);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRspConnection.ReadDebugReg(ind: byte; out AVal: PtrUInt): boolean;
|
function TRspConnection.ReadDebugReg(ind: byte; out AVal: TDbgPtr): boolean;
|
||||||
var
|
var
|
||||||
cmd, reply: string;
|
cmd, reply: string;
|
||||||
|
tmp: qword;
|
||||||
begin
|
begin
|
||||||
cmd := 'p'+IntToHex(ind, 2);
|
cmd := 'p'+IntToHex(ind, 2);
|
||||||
result := FSendCmdWaitForReply(cmd, reply);
|
result := FSendCmdWaitForReply(cmd, reply);
|
||||||
if result then
|
if result then
|
||||||
result := convertHexWithLittleEndianSwap(reply, aval);
|
begin
|
||||||
|
result := convertHexWithLittleEndianSwap(reply, tmp);
|
||||||
|
AVal := PtrUInt(tmp);
|
||||||
|
end;
|
||||||
|
|
||||||
if not result then
|
if not result then
|
||||||
DebugLn(DBG_WARNINGS, ['Warning: "p" command returned unexpected result: ', reply]);
|
DebugLn(DBG_WARNINGS, ['Warning: "p" command returned unexpected result: ', reply]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRspConnection.WriteDebugReg(ind: byte; AVal: PtrUInt): boolean;
|
function TRspConnection.WriteDebugReg(ind: byte; AVal: TDbgPtr): boolean;
|
||||||
var
|
var
|
||||||
cmd, reply: string;
|
cmd, reply: string;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user