This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/43: "attach" command with no args fails on cygwin
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/43: "attach" command with no args fails on cygwin
- From: chastain at redhat dot com
- Date: 17 Mar 2001 19:20:05 -0000
- Reply-To: chastain at redhat dot com
>Number: 43
>Category: gdb
>Synopsis: "attach" command with no args fails on cygwin
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 17 11:28:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: chastain@redhat.com
>Release: cvs version 2001-03-16
>Organization:
>Environment:
Windows 2000 Professional
Cygwin 1.1.8
gcc from a private branch
gdb from a private branch
native i686-pc-cygwin
>Description:
Issue the "attach" command with no arguments.
gdb crashes.
See this code:
/*
* File gdb/win32-nat.c
* Function child_attach
*/
static void
child_attach (char *args, int from_tty)
{
BOOL ok;
DWORD pid = strtoul (args, 0, 0);
if (!args)
error_no_arg ("process-id to attach");
...
}
This is high priority to me because I'm trying to run the
test suite and get usable results.
>How-To-Repeat:
Test script gdb.base/default.exp tests this.
>Fix:
Test for !args before calling strtoul.
>Release-Note:
>Audit-Trail:
>Unformatted: