[lazarus] Display option problem..

Jesus Reyes jesusrmx at yahoo.com.mx
Sat Aug 2 12:29:28 EDT 2003



> 
>  Ok,  I  changed  environment  handling.  Now  the  vars  are 
directly  passed  to 
the 
>  debuggee  environment.  The  debugger  itself  has  it's  own 
environment  (you 
>  currently  cant  modify  it) 
> 
>  Marc 


Hi Marc, I've found some problems:

Environment constructs like this:

mc=() {  mkdir -p $HOME/.mc/tmp 2>/dev/null;
 chmod 700 $HOME/.mc/tmp;
 MC=$HOME/.mc/tmp/mc-$$;
 /usr/bin/mc -P "$@" >"$MC";
 cd "`cat $MC`";
 rm -i -f "$MC";
 unset MC
}

confuse the debugger, here is the output mixed with other valid ones:

[snip]
TCmdLineDebugger.SendCmdLn "-gdb-set env MAIL=/var/spool/mail/prog"
TCmdLineDebugger.SendCmdLn "-gdb-set env mc=() {  mkdir -p
$HOME/.mc/tmp 2>/dev/null;
 chmod 700 $HOME/.mc/tmp;
 MC=$HOME/.mc/tmp/mc-$$;
 /usr/bin/mc -P "$@" >"$MC";
 cd "`cat $MC`";
 rm -i -f "$MC";
 unset MC
}"
TCmdLineDebugger.SendCmdLn "-gdb-set env
NLSPATH=/usr/share/locale/%l/%N"
[Debugger] Log output: &"chmod 700 $HOME/.mc/tmp;\n"
[Debugger] Log output: &"Undefined command: \"chmod\".  Try
\"help\".\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env OLDPWD=/home/prog"
[Debugger] Log output: &"MC=$HOME/.mc/tmp/mc-$$;\n"
[Debugger] Log output: &"Undefined command: \"MC\".  Try \"help\".\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env
PATH=/usr//bin:/bin:/usr/bin::/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/prog/bin"
[Debugger] Log output: &"/usr/bin/mc -P \"$@\" >\"$MC\";\n"
[Debugger] Log output: &"Undefined command: \"\".  Try \"help\".\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env PWD=/home/prog/lazarus"
[Debugger] Log output: &"cd \"`cat $MC`\";\n"
[Debugger] Log output: &"\"`cat $MC`\";: No such file or
directory.\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env QT_XFT=0"
[Debugger] Log output: &"rm -i -f \"$MC\";\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env SECURE_LEVEL=2"
[Debugger] Log output: &"unset MC\n"
[Debugger] Log output: &"Undefined unset command: \"MC\".  Try \"help
unset\".\n"
TCmdLineDebugger.SendCmdLn "-gdb-set env
SESSION_MANAGER=local/pinguino:/tmp/.ICE-unix/2085"
[Debugger] Log output: &"}\n"
[Debugger] Log output: &"Undefined command: \"\".  Try \"help\".\n"

another problem: If I put a check mark to the Display option, the
following code executes:

322     procedure TRunParamsOptions.AssignEnvironmentTo(Strings:
TStrings);
323     begin
324       IDEProcs.AssignEnvironmentTo(Strings,UserOverrides);
325       if UseDisplay then
326         Strings.Values['DISPLAY']:=Display;
327     end;

the problem is in the line 326: TApplication.HandleException
Operation not allowed on sorted StringLists.

If I uncheck the display option, all was ok until the moment to query
the program info:

[snip]
TCmdLineDebugger.SendCmdLn "-gdb-set env XMODIFIERS=@im=none"
[TDebugger.SetFileName] /home/prog/work/Lazarus/lgrid/test1
TCmdLineDebugger.SendCmdLn "-file-exec-and-symbols
/home/prog/work/Lazarus/lgrid/test1"
TCmdLineDebugger.SendCmdLn "-gdb-set language pascal"
[TDebugManager.OnDebuggerChangeState] state: dsStop
[TDebugManager.DoInitDebugger] END
TGDBMIBreakPoint.SetLocation A TRUE TRUE
TGDBMIBreakPoint.SetLocation A TRUE TRUE
TCmdLineDebugger.SendCmdLn "-break-insert unittest1.pas:636"
TCmdLineDebugger.SendCmdLn "-break-insert unittest1.pas:593"
TCmdLineDebugger.SendCmdLn "-environment-cd
/home/prog/work/Lazarus/lgrid/"
TCmdLineDebugger.SendCmdLn "-gdb-set language pascal"
TCmdLineDebugger.SendCmdLn "-break-insert -t main"
TCmdLineDebugger.SendCmdLn "-exec-run"
TCmdLineDebugger.SendCmdLn "-break-insert FPC_RAISEEXCEPTION"
TCmdLineDebugger.SendCmdLn "-break-insert FPC_BREAK_ERROR"
TCmdLineDebugger.SendCmdLn "info program"
[Debugger] Target PID: 0
[TDebugManager.OnDebuggerChangeState] state: dsError
Ooops, the debugger entered the error state

but I dont know if it is related. One question: why is the debug
process running between application runs?.

Jesus Reyes A.

_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx






More information about the Lazarus mailing list