gdb/43: "attach" command with no args fails on cygwin
Sat Mar 17 11:28:00 GMT 2001

>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
>Release:        cvs version 2001-03-16
Windows 2000 Professional
Cygwin 1.1.8
gcc from a private branch
gdb from a private branch
native i686-pc-cygwin

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.
Test script gdb.base/default.exp tests this.
Test for !args before calling strtoul.

More information about the Gdb-prs mailing list