Skip to content

Win64 DelphiCodeCoverage fails on Windows for arm64 #49

Description

@modersohn

When running DelphiCodeCoverage Win64 on a Windows for ARM VM on an Apple Silicon Mac, the debugger fails when ntdll.dll is loaded, because the image type $aa64 is unknown. Here is the call stack into .SetFileName where FStatus is set to stNotSupported, which will then cause an exception in RaiseStatusException.

JclPeImage.TJclPeImage.SetFileName('\\?\C:\Windows\System32\ntdll.dll')
Debugger.TDebugger.HandleLoadDLL((1441048, 0, 1440976, ((6447663, 0, $8525F00, $6B2301, 139642608, (0, 0, 0, 0, 0, 9223653516143347440, 6459630813190, 4224, 632, 140709335334912, 0, 2637864, 1, 2637824, 10383120)), 0), (6447663, $8525F00, $6B2301), (6447663, 139616000, 7021313, $852C6F0, 0, 0, nil, nil, nil, 0), (6447663), (6447663), (6447663, $8525F00, 7021313, 0, $852C6F0, 0), ($62622F), ('H'#$8D'eh[]ÃH'#$90'H'#$8D#4#5, 24320, 2130), (6447663, 0)))
Debugger.TDebugger.ProcessDebugEvents
Debugger.TDebugger.Debug
Debugger.TDebugger.Start
CodeCoverage.CodeCoverage

Interestingly, the Win32 version of DelphiCodeCoverage works just fine.

Activity

  1. modersohn commented on Feb 26, 2026

    @modersohn
    Author

    I just figured out a workaround - not sure if this is feasible under all circumstances, but it helps my case.

    In TDebugger.HandleLoadDLL, when TJCLPEImage.Create is called, pass True to its ANoExceptions parameter.

  2. d4n3x commented on Mar 18, 2026

    @d4n3x

    Hejj @modersohn,
    have u managed to run using a .groupproj with the latest version now?

  3. modersohn commented on Mar 25, 2026

    @modersohn
    Author

    I'm not sure I understand your question? I can see no changes in the repo since almost a year, so I presume I was and am on the latest version? Also how does a .groupproj affect this? I presume it would be identical to a .dproj?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions