Forum > Debugger
How to set HostApplication with a relative path or something similar?
EMBarbosa:
I forgot the patch file...
Martin_fr:
--- Quote from: EMBarbosa on December 28, 2022, 08:03:12 pm ---
I'm not sure it should be implemented this way, as it raise the following questions:
1) The path should be relative to what? The project Dir or the target file dir?
2) Shouldn't other macros, "env var", etc... be checked too?
3)??
--- End quote ---
1)
The target file (if set in the "path" options page) is relative to the project.
So I would say relative to the project directory.
That also goes well with the idea that the host app is in another project. That is likelier easier to find from the current project dir, than from somewhere within (where the exe happens to have ended up)
However see my notes on the gitlab issue
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/32331#note_1223207591
2)
I just tested (Lazarus 2.3 - Win10), this works as host application:
$(ProjSrcPath)\..\foo\project1.exe
Search the IDE for "GlobalMacroList" and you should get all the macros that are added.
Martin_fr:
--- Quote from: Martin_fr on December 29, 2022, 01:02:34 am ---1)
The target file (if set in the "path" options page) is relative to the project.
So I would say relative to the project directory.
That also goes well with the idea that the host app is in another project. That is likelier easier to find from the current project dir, than from somewhere within (where the exe happens to have ended up)
However see my notes on the gitlab issue
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/32331#note_1223207591
--- End quote ---
2nd though => relative to the "working dir".
Might need an extension in the IDE, to query if the debugger already deals with it.
Martin_fr:
If I am not mistaken (and it's late for me, so ....)
If anything is currently handled (eg by gdb) then it likely does
1) an exe without any path: current dir / $PATH
2) an exe with a relative path (i.e. having any / (on Win \ ) in it: relative to current dir.
So if we add to the "not FilenameIsAbsolute" that also "pos(PathSeparotor, exe) > 0" then it should be save to rebase onto working dir.
Let me sleep on that....
(unless it affects the exe name in ARGV[0])
Sorry, I am picky.
But experience shows that other people always relay on those things that I don't have in mind... :)
EMBarbosa:
--- Quote from: Martin_fr on December 29, 2022, 01:21:31 am ---Sorry, I am picky.
But experience shows that other people always relay on those things that I don't have in mind... :)
--- End quote ---
Hi Martin, you don't need to apologize. Someone needs to protect the code, and in this case I'm the one breaking things, :D
Seriously now, I'm a developer of others open source projects, so I really understand this.
I'm just busy with another problem right now. So I will try to back to this later today.
TY
Navigation
[0] Message Index
[#] Next page
[*] Previous page