View Issue Details

IDProjectCategoryView StatusLast Update
0038626LazarusDebuggerpublic2021-04-14 16:36
ReporterMarģers Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Platformx86_64OSlinux 
Product Version2.0.12 
Fixed in Version2.2 
Summary0038626: fpdebug push rax decoded as push eax
DescriptionFpDbgDisasX86.Disassemble
decoded byte count is right, but string representation of instruction is not. See attached test example.
TagsNo tags attached.
Fixed in Revision64991
LazTarget2.2
Widgetset
Attached Files

Activities

Marģers

2021-03-15 06:38

reporter  

testdbg4.pas (930 bytes)   
program testdbg4;
{$mode objfpc}{$h+}
uses FpDbgDisasX86;

const  testCode1 : shortstring = #$50#$58; {push rax; pop rax;}
const  testCode2 : shortstring = #$41#$50#$41#$58; {push r8; pop r8;}
var    p : pointer  ;
       codeBytes, asmInstr : string;
begin
     p:=@testCode1[1];

     FpDbgDisasX86.Disassemble (p, true, codeBytes, asmInstr );
     writeln( codeBytes:20,'    ', asmInstr);
     if asmInstr <> 'push rax' then halt(1);

     FpDbgDisasX86.Disassemble (p, true, codeBytes, asmInstr );
     writeln( codeBytes:20,'    ', asmInstr);
     if asmInstr <> 'pop rax' then halt(2);

     p:=@testCode2[1];

     FpDbgDisasX86.Disassemble (p, true, codeBytes, asmInstr );
     writeln( codeBytes:20,'    ', asmInstr);
     if asmInstr <> 'push r8' then halt(3);

     FpDbgDisasX86.Disassemble (p, true, codeBytes, asmInstr );
     writeln( codeBytes:20,'    ', asmInstr);
     if asmInstr <> 'pop r8' then halt(4);
end.
testdbg4.pas (930 bytes)   

Martin Friebe

2021-04-14 16:36

manager   ~0130375

Please test / close if ok

Issue History

Date Modified Username Field Change
2021-03-15 06:38 Marģers New Issue
2021-03-15 06:38 Marģers Status new => assigned
2021-03-15 06:38 Marģers Assigned To => Martin Friebe
2021-03-15 06:38 Marģers File Added: testdbg4.pas
2021-04-14 16:36 Martin Friebe Status assigned => resolved
2021-04-14 16:36 Martin Friebe Resolution open => fixed
2021-04-14 16:36 Martin Friebe Fixed in Version => 2.2
2021-04-14 16:36 Martin Friebe Fixed in Revision => 64991
2021-04-14 16:36 Martin Friebe LazTarget => 2.2
2021-04-14 16:36 Martin Friebe Note Added: 0130375