[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system/3922: gdb --pid is totally broken in OpenBSD 3.6



The following reply was made to PR system/3922; it has been noted by GNATS.

From: Jedi/Sector One <j@pureftpd.org>
To: Otto Moerbeek <otto@drijf.net>
Cc: gnats@openbsd.org
Subject: Re: system/3922: gdb --pid is totally broken in OpenBSD 3.6
Date: Sat, 11 Sep 2004 18:44:02 +0200

 On Sat, Sep 11, 2004 at 02:49:55PM +0200, Otto Moerbeek wrote:
 > When attaching to a process, the executable should be specified:
 
   Since the behavior when giving a pid/core without an executable is totally
 confusing, maybe we'd better bail out in such a case:
 
 Index: main.c
 ===================================================================
 RCS file: /cvs/src/gnu/usr.bin/binutils/gdb/main.c,v
 retrieving revision 1.3
 diff -u -r1.3 main.c
 --- main.c	2004/05/21 20:23:09	1.3
 +++ main.c	2004/09/11 16:41:29
 @@ -522,6 +522,11 @@
  	      break;
  	    }
        }
 +    if (execarg == NULL && corearg != NULL) {
 +      fprintf_unfiltered (gdb_stderr,
 +			  _("Missing executable file name\n"));
 +      exit (1);
 +    }
      if (batch)
        quiet = 1;
    }