* [PUSHED] inf-child.c: Update comments.
@ 2014-03-12 11:52 Pedro Alves
2014-03-12 12:34 ` Agovic, Sanimir
2014-03-12 13:37 ` [PATCH] inf-child.h: Update comment Pedro Alves
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2014-03-12 11:52 UTC (permalink / raw)
To: gdb-patches
This file is no longer used exclusively by Unix targets anymore.
gdb/
2014-03-12 Pedro Alves <palves@redhat.com>
* inf-child.c: Update top comment to not mention Unix. Add
generic comment describing how this target is meant to be used.
(inf_child_post_attach, inf_child_post_startup_inferior)
(inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention
Unix in comment.
---
gdb/ChangeLog | 8 ++++++++
gdb/inf-child.c | 23 +++++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index abfbfd7..f8d9d05 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-03-12 Pedro Alves <palves@redhat.com>
+ * inf-child.c: Update top comment to not mention Unix. Add
+ generic comment describing how this target is meant to be used.
+ (inf_child_post_attach, inf_child_post_startup_inferior)
+ (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention
+ Unix in comment.
+
+2014-03-12 Pedro Alves <palves@redhat.com>
+
* nto-procfs.c: Include inf-child.h.
(procfs_ops): Delete global.
(procfs_can_run): Delete method.
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index fd03a9f..ee63dd1 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -1,5 +1,4 @@
-/* Default child (native) target interface, for GDB when running under
- Unix.
+/* Base/prototype target for default child (native) targets.
Copyright (C) 1988-2014 Free Software Foundation, Inc.
@@ -18,6 +17,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This file provides a common base class/target that all native
+ target implementations extend, by calling inf_child_target to get a
+ new prototype target and then overriding target methods as
+ necessary. */
+
#include "defs.h"
#include "regcache.h"
#include "memattr.h"
@@ -89,8 +93,8 @@ inf_child_store_inferior_registers (struct target_ops *ops,
static void
inf_child_post_attach (struct target_ops *self, int pid)
{
- /* This version of Unix doesn't require a meaningful "post attach"
- operation by a debugger. */
+ /* This target doesn't require a meaningful "post attach" operation
+ by a debugger. */
}
/* Get ready to modify the registers array. On machines which store
@@ -114,16 +118,15 @@ inf_child_open (char *arg, int from_tty)
static void
inf_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
{
- /* This version of Unix doesn't require a meaningful "post startup
- inferior" operation by a debugger. */
+ /* This target doesn't require a meaningful "post startup inferior"
+ operation by a debugger. */
}
static int
inf_child_follow_fork (struct target_ops *ops, int follow_child,
int detach_fork)
{
- /* This version of Unix doesn't support following fork or vfork
- events. */
+ /* This target doesn't support following fork or vfork events. */
return 0;
}
@@ -136,8 +139,8 @@ inf_child_can_run (struct target_ops *self)
static char *
inf_child_pid_to_exec_file (struct target_ops *self, int pid)
{
- /* This version of Unix doesn't support translation of a process ID
- to the filename of the executable file. */
+ /* This target doesn't support translation of a process ID to the
+ filename of the executable file. */
return NULL;
}
--
1.7.11.7
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PUSHED] inf-child.c: Update comments.
2014-03-12 11:52 [PUSHED] inf-child.c: Update comments Pedro Alves
@ 2014-03-12 12:34 ` Agovic, Sanimir
2014-03-12 12:40 ` Pedro Alves
2014-03-12 13:37 ` [PATCH] inf-child.h: Update comment Pedro Alves
1 sibling, 1 reply; 4+ messages in thread
From: Agovic, Sanimir @ 2014-03-12 12:34 UTC (permalink / raw)
To: 'Pedro Alves'; +Cc: gdb-patches
Hello Pedro,
$ grep -Hni unix inf-child.c
inf-child.c:115: error (_("Use the \"run\" command to start a Unix child process."));
inf-child.c:401: t->to_longname = "Unix child process";
inf-child.c:402: t->to_doc = "Unix child process (started by the \"run\" command).";
"child process" would match the target name/doc better with your committed changes.
-Sanimir
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf
> Of Pedro Alves
> Sent: Wednesday, March 12, 2014 12:52 PM
> To: gdb-patches@sourceware.org
> Subject: [PUSHED] inf-child.c: Update comments.
>
> This file is no longer used exclusively by Unix targets anymore.
>
> gdb/
> 2014-03-12 Pedro Alves <palves@redhat.com>
>
> * inf-child.c: Update top comment to not mention Unix. Add
> generic comment describing how this target is meant to be used.
> (inf_child_post_attach, inf_child_post_startup_inferior)
> (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention
> Unix in comment.
> ---
> gdb/ChangeLog | 8 ++++++++
> gdb/inf-child.c | 23 +++++++++++++----------
> 2 files changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index abfbfd7..f8d9d05 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,5 +1,13 @@
> 2014-03-12 Pedro Alves <palves@redhat.com>
>
> + * inf-child.c: Update top comment to not mention Unix. Add
> + generic comment describing how this target is meant to be used.
> + (inf_child_post_attach, inf_child_post_startup_inferior)
> + (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention
> + Unix in comment.
> +
> +2014-03-12 Pedro Alves <palves@redhat.com>
> +
> * nto-procfs.c: Include inf-child.h.
> (procfs_ops): Delete global.
> (procfs_can_run): Delete method.
> diff --git a/gdb/inf-child.c b/gdb/inf-child.c
> index fd03a9f..ee63dd1 100644
> --- a/gdb/inf-child.c
> +++ b/gdb/inf-child.c
> @@ -1,5 +1,4 @@
> -/* Default child (native) target interface, for GDB when running under
> - Unix.
> +/* Base/prototype target for default child (native) targets.
>
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>
> @@ -18,6 +17,11 @@
> You should have received a copy of the GNU General Public License
> along with this program. If not, see <http://www.gnu.org/licenses/>. */
>
> +/* This file provides a common base class/target that all native
> + target implementations extend, by calling inf_child_target to get a
> + new prototype target and then overriding target methods as
> + necessary. */
> +
> #include "defs.h"
> #include "regcache.h"
> #include "memattr.h"
> @@ -89,8 +93,8 @@ inf_child_store_inferior_registers (struct target_ops *ops,
> static void
> inf_child_post_attach (struct target_ops *self, int pid)
> {
> - /* This version of Unix doesn't require a meaningful "post attach"
> - operation by a debugger. */
> + /* This target doesn't require a meaningful "post attach" operation
> + by a debugger. */
> }
>
> /* Get ready to modify the registers array. On machines which store
> @@ -114,16 +118,15 @@ inf_child_open (char *arg, int from_tty)
> static void
> inf_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
> {
> - /* This version of Unix doesn't require a meaningful "post startup
> - inferior" operation by a debugger. */
> + /* This target doesn't require a meaningful "post startup inferior"
> + operation by a debugger. */
> }
>
> static int
> inf_child_follow_fork (struct target_ops *ops, int follow_child,
> int detach_fork)
> {
> - /* This version of Unix doesn't support following fork or vfork
> - events. */
> + /* This target doesn't support following fork or vfork events. */
> return 0;
> }
>
> @@ -136,8 +139,8 @@ inf_child_can_run (struct target_ops *self)
> static char *
> inf_child_pid_to_exec_file (struct target_ops *self, int pid)
> {
> - /* This version of Unix doesn't support translation of a process ID
> - to the filename of the executable file. */
> + /* This target doesn't support translation of a process ID to the
> + filename of the executable file. */
> return NULL;
> }
>
> --
> 1.7.11.7
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PUSHED] inf-child.c: Update comments.
2014-03-12 12:34 ` Agovic, Sanimir
@ 2014-03-12 12:40 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2014-03-12 12:40 UTC (permalink / raw)
To: Agovic, Sanimir; +Cc: gdb-patches
On 03/12/2014 12:32 PM, Agovic, Sanimir wrote:
> Hello Pedro,
>
> $ grep -Hni unix inf-child.c
> inf-child.c:115: error (_("Use the \"run\" command to start a Unix child process."));
> inf-child.c:401: t->to_longname = "Unix child process";
> inf-child.c:402: t->to_doc = "Unix child process (started by the \"run\" command).";
>
> "child process" would match the target name/doc better with your committed changes.
Yeah, and I was just now sending out a patch for exactly that :-)
https://sourceware.org/ml/gdb-patches/2014-03/msg00284.html
I kept it out, as changing the comments doesn't affect user visible
strings, while that does.
Thanks!
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] inf-child.h: Update comment.
2014-03-12 11:52 [PUSHED] inf-child.c: Update comments Pedro Alves
2014-03-12 12:34 ` Agovic, Sanimir
@ 2014-03-12 13:37 ` Pedro Alves
1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2014-03-12 13:37 UTC (permalink / raw)
To: gdb-patches
On 03/12/2014 11:51 AM, Pedro Alves wrote:
> This file is no longer used exclusively by Unix targets anymore.
>
> gdb/
> 2014-03-12 Pedro Alves <palves@redhat.com>
>
> * inf-child.c: Update top comment to not mention Unix. Add
> generic comment describing how this target is meant to be used.
> (inf_child_post_attach, inf_child_post_startup_inferior)
> (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention
> Unix in comment.
Forgot the header...
Pushed this in as well.
----
[PATCH] inf-child.h: Update comment.
Like inf-child.c, this file is no longer used exclusively by Unix
targets anymore.
gdb/
2014-03-12 Pedro Alves <palves@redhat.com>
* inf-child.h: Update comment to not mention Unix.
---
gdb/ChangeLog | 4 ++++
gdb/inf-child.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f8d9d05..45c5d65 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2014-03-12 Pedro Alves <palves@redhat.com>
+ * inf-child.h: Update comment to not mention Unix.
+
+2014-03-12 Pedro Alves <palves@redhat.com>
+
* inf-child.c: Update top comment to not mention Unix. Add
generic comment describing how this target is meant to be used.
(inf_child_post_attach, inf_child_post_startup_inferior)
diff --git a/gdb/inf-child.h b/gdb/inf-child.h
index c8fa956..4473cff 100644
--- a/gdb/inf-child.h
+++ b/gdb/inf-child.h
@@ -1,4 +1,4 @@
-/* Low level Unix child interface, for GDB when running under Unix.
+/* Base/prototype target for default child (native) targets.
Copyright (C) 2004-2014 Free Software Foundation, Inc.
--
1.7.11.7
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-12 13:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 11:52 [PUSHED] inf-child.c: Update comments Pedro Alves
2014-03-12 12:34 ` Agovic, Sanimir
2014-03-12 12:40 ` Pedro Alves
2014-03-12 13:37 ` [PATCH] inf-child.h: Update comment Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox