public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment
@ 2009-11-19 20:30 vsnijders at vodafonevast dot nl
  2009-11-19 20:31 ` [Bug win32/10989] " vsnijders at vodafonevast dot nl
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: vsnijders at vodafonevast dot nl @ 2009-11-19 20:30 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-03 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10989-4717@http.sourceware.org/bugzilla/>
2010-10-16  8:59 ` [Bug win32/10989] Debuggee doesn't see environment variables set with set environment vsnijders at vodafonevast dot nl
2010-10-16 13:28 ` pedro at codesourcery dot com
2011-10-03 18:16 ` tromey at redhat dot com
2009-11-19 20:30 [Bug win32/10989] New: " vsnijders at vodafonevast dot nl
2009-11-19 20:31 ` [Bug win32/10989] " vsnijders at vodafonevast dot nl
2009-11-19 20:32 ` vsnijders at vodafonevast dot nl
2009-11-27  8:22 ` vsnijders at vodafonevast dot nl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).