* [PATCH] Stale FIXME
@ 2001-05-22 0:24 David Deephanphongs
2001-05-23 16:03 ` Fernando Nasser
0 siblings, 1 reply; 5+ messages in thread
From: David Deephanphongs @ 2001-05-22 0:24 UTC (permalink / raw)
To: gdb-patches
There appears to be a stale FIXME in main.c - it warns about the
argument after the program-name (corearg):
/* FIXME: The documentation says this can be a "ProcID". as well. */
GDB /does/ treat the corearg as a PID, though.
First it tries to open corearg as a core-file. If that fails, it attempts
to use it as a PID (main.c:615-623).
----- Changelog Entry ------
2001-05-22 David Deephanphongs <david@llamedos.org>
* main.c: Removed stale FIXME - GDB /does/ try to use the second
argument as a PID if the arg. isn't a core file.
----- End Changelog Entry -----
----- Patch -----
diff -c3p gdb/main.c gdb-new/main.c
*** gdb/main.c Mon May 7 15:03:11 2001
--- gdb-new/main.c Tue May 22 02:53:54 2001
*************** extern int gdbtk_test (char *);
*** 473,479 ****
execarg = argv[optind];
break;
case 2:
- /* FIXME: The documentation says this can be a "ProcID". as well. */
corearg = argv[optind];
break;
case 3:
--- 473,478 ----
------ End Patch ------
--
Brother Preptil, the master of the music, had described Brutha's voice as
putting him in mind of a disappointed vulture arriving too late at the dead
donkey.
-- (Terry Pratchett, Small Gods)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Stale FIXME
2001-05-22 0:24 [PATCH] Stale FIXME David Deephanphongs
@ 2001-05-23 16:03 ` Fernando Nasser
2001-06-06 14:46 ` Elena Zannoni
0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-05-23 16:03 UTC (permalink / raw)
To: david; +Cc: gdb-patches, Elena Zannoni
David Deephanphongs wrote:
>
> There appears to be a stale FIXME in main.c - it warns about the
> argument after the program-name (corearg):
> /* FIXME: The documentation says this can be a "ProcID". as well. */
>
> GDB /does/ treat the corearg as a PID, though.
> First it tries to open corearg as a core-file. If that fails, it attempts
> to use it as a PID (main.c:615-623).
Yes, and I use it all the time to debug gdb with gdb. That was a badly worded FIXME text. It was supposed to say that we should not be overloading variables and filling them with something that is not related to its name -- 4 bytes is a small price to pay for clarity IMO.
I still would like to keep a note there that saying that corearg may be a PID and not a core file name. Something like:
/* COREARG can be the name of a core file or
the "ProcID" of a process we should attach to. */
Can you submit your patch with the replacement text? I will ask permission to Elena and check it in.
Thanks for the catch.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Stale FIXME
2001-05-23 16:03 ` Fernando Nasser
@ 2001-06-06 14:46 ` Elena Zannoni
2001-06-06 15:02 ` Fernando Nasser
0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2001-06-06 14:46 UTC (permalink / raw)
To: Fernando Nasser; +Cc: david, gdb-patches, Elena Zannoni
Fernando Nasser writes:
> David Deephanphongs wrote:
> >
> > There appears to be a stale FIXME in main.c - it warns about the
> > argument after the program-name (corearg):
> > /* FIXME: The documentation says this can be a "ProcID". as well. */
> >
> > GDB /does/ treat the corearg as a PID, though.
> > First it tries to open corearg as a core-file. If that fails, it attempts
> > to use it as a PID (main.c:615-623).
>
> Yes, and I use it all the time to debug gdb with gdb. That was a badly worded FIXME text. It was supposed to say that we should not be overloading variables and filling them with something that is not related to its name -- 4 bytes is a small price to pay for clarity IMO.
>
> I still would like to keep a note there that saying that corearg may be a PID and not a core file name. Something like:
>
> /* COREARG can be the name of a core file or
> the "ProcID" of a process we should attach to. */
>
> Can you submit your patch with the replacement text? I will ask permission to Elena and check it in.
>
I see, you added the comment... :-) So I trust you know what you meant
to say. Please, modify the comment as you indicated above.
Thanks
Elena
> Thanks for the catch.
>
> --
> Fernando Nasser
> Red Hat - Toronto E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Stale FIXME
2001-06-06 14:46 ` Elena Zannoni
@ 2001-06-06 15:02 ` Fernando Nasser
2001-06-06 18:42 ` David Deephanphongs
0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-06-06 15:02 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Fernando Nasser, david, gdb-patches
Elena Zannoni wrote:
>
> Fernando Nasser writes:
> > David Deephanphongs wrote:
> > >
> > > There appears to be a stale FIXME in main.c - it warns about the
> > > argument after the program-name (corearg):
> > > /* FIXME: The documentation says this can be a "ProcID". as well. */
> > >
> > > GDB /does/ treat the corearg as a PID, though.
> > > First it tries to open corearg as a core-file. If that fails, it attempts
> > > to use it as a PID (main.c:615-623).
> >
> > Yes, and I use it all the time to debug gdb with gdb. That was a badly worded FIXME text. It was supposed to say that we should not be overloading variables and filling them with something that is not related to its name -- 4 bytes is a small price to pay for clarity IMO.
> >
> > I still would like to keep a note there that saying that corearg may be a PID and not a core file name. Something like:
> >
> > /* COREARG can be the name of a core file or
> > the "ProcID" of a process we should attach to. */
> >
> > Can you submit your patch with the replacement text? I will ask permission to Elena and check it in.
> >
>
> I see, you added the comment... :-) So I trust you know what you meant
> to say. Please, modify the comment as you indicated above.
>
> Thanks
> Elena
>
Thank you Elena.
There is also a patch from David Deephanphongs that proposes creating
a new variable in this same thread.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Stale FIXME
2001-06-06 15:02 ` Fernando Nasser
@ 2001-06-06 18:42 ` David Deephanphongs
0 siblings, 0 replies; 5+ messages in thread
From: David Deephanphongs @ 2001-06-06 18:42 UTC (permalink / raw)
To: gdb-patches
Thus spake Fernando Nasser (fnasser@redhat.com):
> Thank you Elena.
>
> There is also a patch from David Deephanphongs that proposes creating
> a new variable in this same thread.
>
FYI, I'm waiting for some base aye/nay from Elena before I deal with any
renaming-of-variables issues in the second patch.
Dave
--
"Well, 'scuse me. I was jus' tryin' to save the world."
-- Gaspode the wonder dog
(Terry Pratchett, Moving Pictures)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-06-06 18:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-22 0:24 [PATCH] Stale FIXME David Deephanphongs
2001-05-23 16:03 ` Fernando Nasser
2001-06-06 14:46 ` Elena Zannoni
2001-06-06 15:02 ` Fernando Nasser
2001-06-06 18:42 ` David Deephanphongs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox