[Lazarus] Lazarus debugger location on Win x86/x64

Reinier Olislagers reinierolislagers at gmail.com
Mon Jul 30 11:02:20 CEST 2012


On 30-7-2012 10:51, Mattias Gaertner wrote:
> On Mon, 30 Jul 2012 10:38:57 +0200
> Reinier Olislagers <reinierolislagers at gmail.com> wrote:
>> The location for gdb.exe in EnvironmentOptions.xml is set by default to
>> <DebuggerFilename Value="%LazDir%\mingw\bin\gdb.exe">
> 
> The %LazDir% is replaced by the installer. It should not be in
> the installed file.
Ok, got that.

>> Would it make sense to create this directory structure
>> %LazDir%\mingw\bin\$(TargetCPU)\
>> or even
>> %LazDir%\mingw\bin\$(TargetCPU)-$(TargetOS)
> 
> I don't know mingw, so I can't help there.
Neither do I... but there is a 64 bit Windows gdb.exe that is different
from the 32 bit Windows gdb.exe.
On the off chance that debuggers might become (or are) available for
other platforms (e.g. wince-arm) perhaps the second notation would be
the best.

Regarding the naming: I obviously chose those to correspond to the
macros in the IDE. If debugger executable names for different platforms
would not be called gdb.exe, further adjustments would need to be
made... but AFAIU they couldn't be covered by a simple macro in the
debugger path.
(I also vaguely recall that mingw or at least gcc has a different naming
convention for platforms/CPUs... which will not influence the issue
above but could impact other systems)

For clarity: I'm referring to the Windows installer tree here, so no
effect for other platforms.

Alternatives could be:
1. leave the situation as is
2. create a debugger path setting in the GUI per targetos/cpu pair.
Seems complicated given the Win32/Win64 goal described above but might
perhaps be useful when setting up cross compiling environments on
Linux... no experience there though.


>> This way, we could change the debugger depending on project target,
>> which helps if you have e.g. both x86 and x64 LCL installed:
>> <DebuggerFilename Value="%LazDir%\mingw\bin\%TargetCPU%-%TargetOS%\gdb.exe">
>>
>> Only thing is: I don't know if TargetCPU and TargetOS are actually
>> supported: I tried looking for LazDir to see if it is an IDE macro
>> (which it presumably is??) in
>> http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames
>> and didn't find anything.
> 
> The macro is $(LazarusDir).
Yep, thanks, that makes sense - I was thrown by the LazDir in the
installer's version of environmentoptions.xml :)





More information about the Lazarus mailing list