This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment


If I set an environment variable in gdbm the debugged program does not see it.

C:\lazarus\bugs\gdbenv>..\..\source\binaries\i386-win32\gdb\bin\gdb.exe gdbenvbu
g.exe -n
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\lazarus\bugs\gdbenv/gdbenvbug.exe...done.
(gdb) set environment TEST_GDB_ENV=Hi
(gdb) show environment TEST_GDB_ENV
TEST_GDB_ENV = Hi
(gdb) r
Starting program: C:\lazarus\bugs\gdbenv/gdbenvbug.exe
[New Thread 2320.0xc8c]
warning: Can not parse XML library list; XML support was disabled at compile tim
e
TEST_GDB_ENV=


Program exited normally.
(gdb) q

Setting the environment variabele at the command prompt and running the program
works:
C:\lazarus\bugs\gdbenv>set TEST_GDB_ENV=Hi
C:\lazarus\bugs\gdbenv>gdbenvbug.exe
TEST_GDB_ENV=Hi

Source of the pascal program:
C:\lazarus\bugs\gdbenv>type gdbenvbug.lpr
program gdbenvbug;

{$mode objfpc}{$H+}

uses
  SysUtils;

begin
  writeln('TEST_GDB_ENV=',GetEnvironmentVariable('TEST_GDB_ENV'));
  readln;
end.

-- 
           Summary: Debuggee doesn't see environment variables set with set
                    environment
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: win32
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: vsnijders at vodafonevast dot nl
                CC: gdb-prs at sourceware dot org
  GCC host triplet: mingw32
GCC target triplet: mingw32


http://sourceware.org/bugzilla/show_bug.cgi?id=10989

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]