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; 4+ 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] 4+ messages in thread

* [Bug win32/10989] Debuggee doesn't see environment variables set with set environment
  2009-11-19 20:30 [Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment vsnijders at vodafonevast dot nl
@ 2009-11-19 20:31 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: vsnijders at vodafonevast dot nl @ 2009-11-19 20:31 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From vsnijders at vodafonevast dot nl  2009-11-19 20:31 -------
Created an attachment (id=4398)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4398&action=view)
Pascal source code


-- 


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] 4+ messages in thread

* [Bug win32/10989] Debuggee doesn't see environment variables set with set environment
  2009-11-19 20:30 [Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment 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
  2 siblings, 0 replies; 4+ messages in thread
From: vsnijders at vodafonevast dot nl @ 2009-11-19 20:32 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From vsnijders at vodafonevast dot nl  2009-11-19 20:32 -------
Created an attachment (id=4399)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4399&action=view)
win32 executable with debug info 


-- 


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] 4+ messages in thread

* [Bug win32/10989] Debuggee doesn't see environment variables set with set environment
  2009-11-19 20:30 [Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment 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
  2 siblings, 0 replies; 4+ messages in thread
From: vsnijders at vodafonevast dot nl @ 2009-11-27  8:22 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From vsnijders at vodafonevast dot nl  2009-11-27 08:22 -------
This works correctly with gdb 6.3, that is distributed with the free pascal
compiler version 2.2.2:

C:\lazarus\bugs\gdbenv>c:\fpc\2.2.2\bin\i386-win32\gdb.exe gdbenvbug.exe
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) set environment TEST_GDB_ENV=Hi
(gdb) r
Starting program: C:\lazarus\bugs\gdbenv/gdbenvbug.exe
TEST_GDB_ENV=Hi


-- 


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] 4+ messages in thread

end of thread, other threads:[~2009-11-27  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19 20:30 [Bug win32/10989] New: Debuggee doesn't see environment variables set with set environment 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).