Recent

Author Topic: "gdbserver" for Windows ARM64  (Read 431 times)

oh_ha

  • New Member
  • *
  • Posts: 13
"gdbserver" for Windows ARM64
« on: October 03, 2025, 09:14:33 am »
I currently have access to a laptop with a Snapdragon CPU running Windows 11 24H2 on ARM.

I have succeeded in installing the "aarch64-win64" support for Lazarus and can successfully compile and run native ARM programs.
But one of my more complex programs crashes on start. In order to figure out what's going on, I need "gdbserver" for Windows ARM64, and I cannot find a precompiled version. All searches only lead to programs compiled for Linux or the source code.

Can someone point me to a download of "gdbserver" compiled for Windows ARM64?

Any help greatly appreciated.

Thaddy

  • Hero Member
  • *****
  • Posts: 18376
  • Here stood a man who saw the Elbe and jumped it.
Re: "gdbserver" for Windows ARM64
« Reply #1 on: October 03, 2025, 09:19:11 am »
You *should* use not gdbserver but gdbmi a.k.a. GDB/MI. It is enough to have gdb installed to use it.
Note I did not try for windows aarch64 but it should not be different.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 302
  • I use FPC [main] 💪🐯💪
Re: "gdbserver" for Windows ARM64
« Reply #2 on: October 03, 2025, 09:45:14 am »
Quote from: oh_ha
...
I'm not very familiar with this topic, but it seems that Thaddy is right

Not long ago, I also ran Lazarus on my smartphone for fun (Termux -> PRoot -> Debian Linux AArch64 -> VNC -> FPCUpDeluxe -> FPC + Lazarus) and when I launched it, I had to specify the path to the gdb executable file, and communication with gdb already exists in Lazarus using the protocol that Thaddy mentioned. If I'm not mistaken

GDBServer is, as far as I understand, for remote debugging
I may seem rude - please don't take it personally

PascalDragon

  • Hero Member
  • *****
  • Posts: 6195
  • Compiler Developer
Re: "gdbserver" for Windows ARM64
« Reply #3 on: October 06, 2025, 02:43:39 pm »
There simply is no GDB support for aarch64-win64 yet by GDB itself. Maybe someone can instead try to improve/add FpDebug's support for Aarch64 instead.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1845
Re: "gdbserver" for Windows ARM64
« Reply #4 on: October 06, 2025, 03:15:05 pm »
You can install msys[2] on your ARM64 system.
Open a (the) clang terminal.
Debug by using lldb from within this terminal. Lldb can read your dwarf debug info.
Code: Pascal  [Select][+][-]
  1. lldb yourapp.exe
  2. run
  3. bt

PascalDragon

  • Hero Member
  • *****
  • Posts: 6195
  • Compiler Developer
Re: "gdbserver" for Windows ARM64
« Reply #5 on: October 06, 2025, 03:43:56 pm »
Why not simply install the ordinary aarch64-win64 build of LLVM and thus lldb? One could also try to set up an LLDB debugger backend inside Lazarus with that lldb (not tested).

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1845
Re: "gdbserver" for Windows ARM64
« Reply #6 on: October 06, 2025, 03:45:37 pm »
@PascalDragon
That seems fine to me !
I just posted my own setup.

 

TinyPortal © 2005-2018