Re: [RFA] Add new cmd line parameter "--pid" for attach.

Michael Snyder
2002-01-11T01:06:17Z

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

Andrew Cagney wrote:
>
> > "To remove a file called `-f' in the current directory, you could type
> > either rm -- -f or rm ./-f "
>
> ``--''? Since when was ``--'' an option to rm? You'll be telling me
> UNIX comes with colour LS next .... :-^
>
> Yes. The use of ./1234 should be documented. So should (in the NEWS
> file) the quiet switch of how <pid> vs <core> is decided.

How's this?

(I suppose next you'll be wanting something on the gcore command... <g>)

[-- Attachment #2: NEWS.patch --]
[-- Type: text/plain, Size: 1197 bytes --]

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.49
diff -c -3 -p -r1.49 NEWS
*** NEWS 2002/01/06 15:02:00 1.49
--- NEWS 2002/01/11 01:04:44
***************
*** 3,8 ****
--- 3,25 ----

*** Changes since GDB 5.1:

+ * New command line option
+
+ GDB now accepts --pid or -p followed by a process id.
+
+ * Change in command line behavior -- corefiles vs. process ids.
+
+ There is a subtle behavior in the way in which GDB handles
+ command line arguments. The first non-flag argument is always
+ a program to debug, but the second non-flag argument may either
+ be a corefile or a process id. Previously, GDB would attempt to
+ open the second argument as a corefile, and if that failed, would
+ issue a superfluous error message and then attempt to attach it as
+ a process. Now, if the second argument begins with a non-digit,
+ it will be treated as a corefile. If it begins with a digit,
+ GDB will attempt to attach it as a process, and if no such process
+ is found, will then attempt to open it as a corefile.
+
* New native configurations

x86 OpenBSD i[3456]86-*-openbsd*