public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 1.1.0 gdb troubles
@ 2000-04-17 21:32 Boyd Adamson
  2000-04-17 21:47 ` Chris Faylor
  0 siblings, 1 reply; 21+ messages in thread
From: Boyd Adamson @ 2000-04-17 21:32 UTC (permalink / raw)
  To: cygwin

Hi, I just installed cygwin 1.1.0. and I was looking forward to playing with
Insight, but had a problem with gdb hanging when I run even the simplest
program under it.

bash-2.03$ cat trial.c
#include <stdio.h>

int main(int argc, char **argv){
    printf("This is a test\n");
    exit(0);
}
bash-2.03$ gcc -Wall -g3 -o trial trial.c
bash-2.03$ ls -l
total 8
-rw-r--r--   1 boyd     Administ      100 Apr 18 14:23 trial.c
-rwxr-xr-x   1 boyd     Administ    13179 Apr 18 14:24 trial.exe
bash-2.03$ ./trial
This is a test
bash-2.03$ gdb -nw trial.exe
GNU gdb 20000204
Copyright 2000 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-cygwin"...
(gdb) run
Starting program: /tmp/trial.exe
61000000:d:/cygwin/bin/cygwin1.dll
77db0000:D:/WINNT/system32/ADVAPI32.DLL
77e80000:D:/WINNT/system32/KERNEL32.DLL
77d30000:D:/WINNT/system32/RPCRT4.DLL

... and there it hangs. This happens in the gui as well.

Anyway, in the process of trying to work this out I used a find command and
got
this output (The redirection only hides the output from directories other
than
/tmp & /usr)

bash-2.03$ find / > /dev/null
find: /tmp: No such file or directory
find: /uninst.bat: No such file or directory
find: /usr: No such file or directory
bash-2.03$ ls -l /
total 66
drwxr-xr-x   2 boyd     Administ    28672 Apr 18 14:17 bin
drwxr-xr-x   3 boyd     Administ     4096 Apr 18 14:17 lib
drwxr-xr-x   2 boyd     Administ        0 Apr 18 14:17 tmp
-rwxr-xr-x   1 boyd     Administ    96927 Apr 18 14:17 uninst.bat
drwxr-xr-x  12 boyd     Administ     4096 Apr 18 14:17 usr
bash-2.03$ mount
Device              Directory           Type         Flags
d:\cygwin\bin       /usr/bin            user         binmode
d:\cygwin\lib       /usr/lib            user         binmode
d:\cygwin           /                   user         binmode

Are these issues related? Could it be that the problem find is
having with the /tmp directory is causing gdb's woes?

I'm on Win2000 with an NTFS filesystem if it makes any difference.

Thanks for any help in advance,

Boyd


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Cygwin 1.1.0 gdb troubles
@ 2000-04-18 14:11 Heribert Dahms
  2000-04-18 14:26 ` Chris Faylor
  0 siblings, 1 reply; 21+ messages in thread
From: Heribert Dahms @ 2000-04-18 14:11 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi Chris,

but how can I get then the proper Unix behavior
for a program foo writing it's getpid() to foo.id:
gdb foo `cat foo.id`
without manually looking up WINPID?

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	Chris Faylor [SMTP:cgf@cygnus.com]
> Sent:	Tuesday, April 18, 2000 21:29
> To:	cygwin@sourceware.cygnus.com
> Subject:	Re: Cygwin 1.1.0 gdb troubles
> 
> On Tue, Apr 18, 2000 at 04:45:45PM +1000, Boyd Adamson wrote:
> [Heribert]  [snip]
> >Actually, yes, I am able to attach to a running process, although I
> have to
> >use the process ID that the Windows Task Manager gives, not the pid
> that
> >bash gives for a background job. I saw this particular behavior in
> B20 also.
> 
> I.e., it's working as designed.  gdb works on more than just cygwin
> processes.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Cygwin 1.1.0 gdb troubles
@ 2000-04-18 14:32 Heribert Dahms
  2000-04-18 14:39 ` Chris Faylor
  0 siblings, 1 reply; 21+ messages in thread
From: Heribert Dahms @ 2000-04-18 14:32 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi Chris,

sure, that's why I said without manual lookup!

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	Chris Faylor [SMTP:cgf@cygnus.com]
> Sent:	Tuesday, April 18, 2000 23:26
> To:	'cygwin@sourceware.cygnus.com'
> Subject:	Re: Cygwin 1.1.0 gdb troubles
> 
> On Tue, Apr 18, 2000 at 11:08:35PM +0200, Heribert Dahms wrote:
> >but how can I get then the proper Unix behavior for a program foo
> >writing it's getpid() to foo.id: gdb foo `cat foo.id` without
> manually
> >looking up WINPID?
> 
> If you're talking about translating the cygwin pid to a windows pid,
> you can get both using the "ps -l" command.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Cygwin 1.1.0 gdb troubles
@ 2000-04-18 15:04 Heribert Dahms
  0 siblings, 0 replies; 21+ messages in thread
From: Heribert Dahms @ 2000-04-18 15:04 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi Chris,

it's easy, but is there a guarantee that the format dosen't change?
I remember man ps from HP-UX 10.20 under WARNINGS:

      Users of ps must not rely on the exact field widths and spacing of
its
      output, as these will vary depending on the system, the release of
      HP-UX, and the data to be displayed.

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	Chris Faylor [SMTP:cgf@cygnus.com]
> Sent:	Tuesday, April 18, 2000 23:38
> To:	'cygwin@sourceware.cygnus.com'
> Subject:	Re: Cygwin 1.1.0 gdb troubles
> 
> On Tue, Apr 18, 2000 at 11:30:17PM +0200, Heribert Dahms wrote:
> >sure, that's why I said without manual lookup!
> 
> I wasn't suggesting that you manually lookup the pid.  It
> is easy to parse the ps output in a shell script.
> 
> cgf
> [Heribert]  [snip] 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Cygwin 1.1.0 gdb troubles
@ 2000-04-19  6:02 Christopher Jones
  2000-04-19  7:15 ` Re[2]: " Paul Sokolovsky
  2000-04-19  9:47 ` Chris Faylor
  0 siblings, 2 replies; 21+ messages in thread
From: Christopher Jones @ 2000-04-19  6:02 UTC (permalink / raw)
  To: Heribert Dahms, 'cygwin@sourceware.cygnus.com'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

Title: RE: Cygwin 1.1.0 gdb troubles







> -----Original Message-----
> From: Heribert Dahms [ mailto:heribert_dahms@icon-gmbh.de ]
> Sent: Tuesday, April 18, 2000 6:02 PM
> To: 'cygwin@sourceware.cygnus.com'
> Subject: RE: Cygwin 1.1.0 gdb troubles
> 
> 
> Hi Chris,
> 
> it's easy, but is there a guarantee that the format dosen't change?
> I remember man ps from HP-UX 10.20 under WARNINGS:
> 
>       Users of ps must not rely on the exact field widths and 
> spacing of
> its
>       output, as these will vary depending on the system, the 
> release of
>       HP-UX, and the data to be displayed.
> 


Seems like it would make more sense to at least hide these cygwin pids and let users always use windows pids for ps, kill, $$ in a shell, etc.  So the PID and PPID values would be the real windows values and cygwin pids would disappear into the internals somewhere... probably a lookup table if you really need to have them still.  Something like this would be more seemless, wouldn't it?

Brian




^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Cygwin 1.1.0 gdb troubles
@ 2000-04-19 10:45 Christopher Jones
  2000-04-19 10:49 ` Chris Faylor
  0 siblings, 1 reply; 21+ messages in thread
From: Christopher Jones @ 2000-04-19 10:45 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Title: RE: Cygwin 1.1.0 gdb troubles





> 
> The main reason for cygwin pids is that there is no corresponding
> exec*() style interface in Win32 land.  Most programs which 
> use fork/exec
> also rely on the fact that the exec'ed process has the same PID as the
> fork.  There is no way to do this using the Win32 API.


Thanks for the explanation Chris.  It had been a while since I dealt with fork/exec and I'd forgotten how much they rely on a certain PID behavior.  So the only other way to go would be to assign win32 processes cygwin pids which would probably lead to more yuckiness; and maybe there is not a way to muck with the internals of windows such that cygwin is always resident and receiving notification of new win32 process/thread creation.  Ick.  Oh well.  :)

Brian




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

end of thread, other threads:[~2000-04-21  8:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-17 21:32 Cygwin 1.1.0 gdb troubles Boyd Adamson
2000-04-17 21:47 ` Chris Faylor
2000-04-17 22:30   ` Chris Faylor
2000-04-17 23:41     ` Boyd Adamson
2000-04-18 12:29       ` Chris Faylor
2000-04-18  6:12   ` Tim Prince
2000-04-18 13:17     ` Chris Faylor
2000-04-18 14:11 Heribert Dahms
2000-04-18 14:26 ` Chris Faylor
2000-04-18 14:32 Heribert Dahms
2000-04-18 14:39 ` Chris Faylor
2000-04-18 15:04 Heribert Dahms
2000-04-19  6:02 Christopher Jones
2000-04-19  7:15 ` Re[2]: " Paul Sokolovsky
2000-04-19  7:22   ` DJ Delorie
2000-04-19 12:19     ` Re[2]: " Paul Sokolovsky
2000-04-19 12:31       ` DJ Delorie
2000-04-19 16:27       ` Chris Faylor
2000-04-19 10:05   ` Chris Faylor
2000-04-20 23:37     ` Re[2]: " Paul Sokolovsky
2000-04-21  8:08       ` Chris Faylor
2000-04-19  9:47 ` Chris Faylor
2000-04-19 10:45 Christopher Jones
2000-04-19 10:49 ` Chris Faylor

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).