Lazarus

Using the Lazarus IDE => Debugger => Topic started by: CCRDude on October 30, 2018, 12:47:30 pm

Title: How can I set up debugging for cross-compiled files?
Post by: CCRDude on October 30, 2018, 12:47:30 pm
Windows 10 brings WSL (Windows Subsystem for Linux), which allows to run cross-compiled linux ELF binaries (for the same hardware) natively.

gdb is available in WSL.

Challenge 1: Lazarus tells me gdb is not found. My fpcupdeluxe Installation looks for it in the fpcbootstrap\gdb\x86_64-linux\ folder. I can wrap up a small wrapper that calls "wsl gdb" and place it there to continue.

Challenge 2: Lazarus won't debug my executable, because the path is different. Forward input and output streams and manipulating them to change \ to / and prepend /mnt/c/ to the executing call is far from what I could do in a spare minute though.

Has anyone had success in debugging Linux binaries on Windows through WSL?
Title: Re: How can I set up debugging for cross-compiled files?
Post by: Martin_fr on November 03, 2018, 06:34:25 pm
This will probably need some work. Please report as a reminder/feature-request on our bugtracker
TinyPortal © 2005-2018