Lazarus

Using the Lazarus IDE => Debugger => Topic started by: MarkMLl on August 16, 2020, 12:33:26 pm

Title: gdbserver and parameters
Post by: MarkMLl on August 16, 2020, 12:33:26 pm
When using gdbserver, which parameters should take precedence: those entered in the IDE or those given on the command line?

At least under Linux, it appears necessary to enter them on the command line and the ones in the IDE are ignored.

MarkMLl
Title: Re: gdbserver and parameters
Post by: Martin_fr on August 16, 2020, 12:44:33 pm
You mean parameter/arguments to your app? "project1 -v - foo"?

With gdbserver the IDE never starts your project. So it can not pass on any args.

IIRC, when you do
gdbserver host port project1

gdbserver will already start your app, and pause it on the first instruction. So at the time the IDE gets to connect to it, it is already to late.
Title: Re: gdbserver and parameters
Post by: MarkMLl on August 16, 2020, 12:58:14 pm
OK. As distinct from ordinary gdb, which wants an explicit command to set up the debugee's parameters.

A warning from the IDE that the parameters it had been told to apply would be very useful.

MarkMLl
Title: Re: gdbserver and parameters
Post by: Martin_fr on August 16, 2020, 01:17:55 pm
Agreed, please add a feature request on the bugtracker
Title: Re: gdbserver and parameters
Post by: MarkMLl on August 16, 2020, 03:36:04 pm
https://bugs.freepascal.org/view.php?id=37581

MarkMLl
TinyPortal © 2005-2018