[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: system/3922: gdb --pid is totally broken in OpenBSD 3.6
- To: bugs@cvs.openbsd.org
- Subject: Re: system/3922: gdb --pid is totally broken in OpenBSD 3.6
- From: Otto Moerbeek <otto@drijf.net>
- Date: Sun, 12 Sep 2004 13:35:02 -0600 (MDT)
The following reply was made to PR system/3922; it has been noted by GNATS.
From: Otto Moerbeek <otto@drijf.net>
To: Jedi/Sector One <j@pureftpd.org>
Cc: gnats@openbsd.org
Subject: Re: system/3922: gdb --pid is totally broken in OpenBSD 3.6
Date: Sun, 12 Sep 2004 21:15:18 +0200 (CEST)
On Sat, 11 Sep 2004, Jedi/Sector One wrote:
> 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;
> }
I agree that the error message is confusing and ugly; but I do not know if
this is the right approach. On some (a.out?) archs just giving a pid might
work.
-Otto