[lazarus] New Bug Entered

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 31 16:15:44 EDT 2003


On Thu, 31 Jul 2003 15:10:45 -0500 (CDT)
Jesus Reyes <jesusrmx at yahoo.com.mx> wrote:

>  --- Mattias Gaertner <nc-gaertnma at netcologne.de> escribió: > On Thu,
> 31 Jul 2003 14:17:12 -0500 (CDT)
> > Jesus Reyes <jesusrmx at yahoo.com.mx> wrote:
> > 
> > >  --- Mattias Gaertner <nc-gaertnma at netcologne.de> escribió: > On
> > Thu,
> > > 31 Jul 2003 13:32:12 -0400
> > > > bugtracker at miraclec.com wrote:
> > > > 
> > > > > 
> > > > > Title: Display option doesn\'t work
> > > > > 
> > > > > Entered by: Jesus Reyes A.
> > > > > 
> > > > > The option: Run->Run Parameters...->Local->Display doesn\'t
> > work
> > > > (lazarus
> > > > > v0.9.0 beta/linux/mandrake 9.0) 
> > > > 
> > > > It works for me.
> > > > Can you give more details?
> > > > 
> > > > 
> > > > Mattias
> > > > 
> > > 
> > > if I do:
> > > 
> > > $>export DISPLAY=quimica:0.0
> > > $>./test1
> > > 
> > > I get the output of test1 in quimica, also using gdb, setting set
> > env
> > > DISPLAY=quimica:0 works for me. But it seems that, the
> > corresponding
> > > checkbox in the dialog box doesn't do anything here. I tried to
> > > override the DISPLAY value in run->run
> > parameters..->enviroment->user
> > > overrides also without effect.
> > 
> > This is the same. The display groupbox is just a shortcut for
> > setting the
> > variable in the user overrides. The IDE sets the environment
> > variables and
> > starts gdb. Maybe your gdb resets the DISPLAY variable. Can you do
> > 
> > $>export DISPLAY=quimica:0.0
> > $>gdb ./test1
> > (gdb) run
> > 
> > ?
> > 
> > Mattias
> > 
> 
> It worked fine, I see the output of test1 in quimica, both with gdb
> and gdb53 (which is what I use in the IDE). could it be that the IDE
> is reading this from cached values?.

Don't think so. But somewhere the DISPLAY variable is lost.
Maybe you want to find out yourself:
The environment variables are given to the debugger in
debugmanager.pas line 1338:
Project1.RunParameterOptions.AssignEnvironmentTo(FDebugger.Environment);
You can add a writeln(FDebugger.Environment.Text); to see the variables.
If you follow the AssignEnvironmentTo with "find declaration" you will see,
that there is not much code in there. It fetches the current env vars and
replaces the overrides.

The debugger creates a TProcess and assigns the variables to it in 
debugger/cmdlinedebugger.pp line 180.

Just add a few writelns to find out, where the DISPLAY variable is lost.


Mattias






More information about the Lazarus mailing list