mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 00:54:03 +02:00
Remove FP from register list, since the information is already present in registers r28 and r29
This commit is contained in:
parent
c6e6de1294
commit
3b36f05e27
@ -31,12 +31,9 @@ const
|
|||||||
PCindex = 34; // 4 bytes
|
PCindex = 34; // 4 bytes
|
||||||
RegArrayLength = 35;
|
RegArrayLength = 35;
|
||||||
// Special register names
|
// Special register names
|
||||||
nSREG = 'SREG';
|
nSREG = 'SReg';
|
||||||
nSP = 'SP';
|
nSP = 'SP';
|
||||||
nPC = 'PC';
|
nPC = 'PC';
|
||||||
// Frame pointer for AVR is [r28:r29], but create an alias for stack frame processing
|
|
||||||
nFP = 'FP';
|
|
||||||
FPindex = 35;
|
|
||||||
|
|
||||||
// Byte level register indexes
|
// Byte level register indexes
|
||||||
SPLindex = 33;
|
SPLindex = 33;
|
||||||
@ -535,9 +532,13 @@ begin
|
|||||||
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(PCindex);
|
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(PCindex);
|
||||||
if R = nil then exit;
|
if R = nil then exit;
|
||||||
Address := R.NumValue;
|
Address := R.NumValue;
|
||||||
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(FPindex);
|
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(28);
|
||||||
if R = nil then exit;
|
if R = nil then exit;
|
||||||
FrameBase := R.NumValue;
|
FrameBase := R.NumValue;
|
||||||
|
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(29);
|
||||||
|
if R = nil then exit;
|
||||||
|
FrameBase := FrameBase + (byte(R.NumValue) shl 8);
|
||||||
|
|
||||||
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(SPindex);
|
R := AnEntry.RegisterValueList.FindRegisterByDwarfIndex(SPindex);
|
||||||
if R = nil then exit;
|
if R = nil then exit;
|
||||||
StackPtr := R.NumValue;
|
StackPtr := R.NumValue;
|
||||||
@ -554,7 +555,7 @@ begin
|
|||||||
// Y pointer register [r28:r29] is used as frame pointer for AVR
|
// Y pointer register [r28:r29] is used as frame pointer for AVR
|
||||||
// Store these to enable stack based parameters to be read correctly
|
// Store these to enable stack based parameters to be read correctly
|
||||||
// as they are frame pointer relative and dwarf stores the frame pointer under r28
|
// as they are frame pointer relative and dwarf stores the frame pointer under r28
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nFP].SetValue(FrameBase, IntToStr(FrameBase),Size, FPindex);
|
//AnEntry.RegisterValueList.DbgRegisterAutoCreate[nFP].SetValue(FrameBase, IntToStr(FrameBase),Size, FPindex);
|
||||||
b := byte(FrameBase);
|
b := byte(FrameBase);
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r28'].SetValue(b, IntToStr(b),Size, 28);
|
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r28'].SetValue(b, IntToStr(b),Size, 28);
|
||||||
b := (FrameBase and $FF00) shr 8;
|
b := (FrameBase and $FF00) shr 8;
|
||||||
@ -605,12 +606,9 @@ begin
|
|||||||
|
|
||||||
AnEntry := TDbgCallstackEntry.create(Self, NextIdx, FrameBase, Address);
|
AnEntry := TDbgCallstackEntry.create(Self, NextIdx, FrameBase, Address);
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nPC].SetValue(Address, IntToStr(Address),Size, PCindex);
|
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nPC].SetValue(Address, IntToStr(Address),Size, PCindex);
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nFP].SetValue(FrameBase, IntToStr(FrameBase),Size, FPindex);
|
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nSP].SetValue(StackPtr, IntToStr(StackPtr),Size, SPindex);
|
AnEntry.RegisterValueList.DbgRegisterAutoCreate[nSP].SetValue(StackPtr, IntToStr(StackPtr),Size, SPindex);
|
||||||
b := byte(FrameBase);
|
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r28'].SetValue(byte(FrameBase), IntToStr(b),Size, 28);
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r28'].SetValue(b, IntToStr(b),Size, 28);
|
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r29'].SetValue((FrameBase and $FF00) shr 8, IntToStr(b),Size, 29);
|
||||||
b := (FrameBase and $FF00) shr 8;
|
|
||||||
AnEntry.RegisterValueList.DbgRegisterAutoCreate['r29'].SetValue(b, IntToStr(b),Size, 29);
|
|
||||||
|
|
||||||
FCallStackEntryList.Add(AnEntry);
|
FCallStackEntryList.Add(AnEntry);
|
||||||
Dec(CountNeeded);
|
Dec(CountNeeded);
|
||||||
|
Loading…
Reference in New Issue
Block a user