This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gdb/43: "attach" command with no args fails on cygwin



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]