Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Don't mention "Unix" in native target name.
@ 2014-03-12 12:38 Pedro Alves
  2014-03-12 13:16 ` Gary Benson
  2014-03-12 13:37 ` Rename Solaris's target to "target child" like most other ports Pedro Alves
  0 siblings, 2 replies; 7+ messages in thread
From: Pedro Alves @ 2014-03-12 12:38 UTC (permalink / raw)
  To: gdb-patches

I wonder whether anyone would miss this badly?  The difference would be:

  (gdb) maint print target-stack
  The current target stack is:
   - multi-thread (multi-threaded child process.)
-  - child (Unix child process)
+  - child (Child process)
   - exec (Local exec file)
   - None (None)

 (gdb) help target child
- Unix child process (started by the "run" command).
+ Child process (started by the "run" command).

I find it unnecessary (and really slightly a lie) on GNU/Linux.

It's also odd that e.g., the Windows port says "Unix" in reaction to
"target child" (it was already that way before Windows used
inf-child.c).

How about we just say the same mostly everywhere?

In the same vein, I'd also rename Solaris/procfs.c's "target procfs"
to "target child".

gdb/
2014-03-12  Pedro Alves  <palves@redhat.com>

	* inf-child.c (inf_child_open, inf_child_target): Don't mention
	Unix in user visible strings.
---
 gdb/inf-child.c                    | 6 +++---
 gdb/testsuite/gdb.base/default.exp | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index ee63dd1..bfa9152 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -112,7 +112,7 @@ inf_child_prepare_to_store (struct target_ops *self,
 static void
 inf_child_open (char *arg, int from_tty)
 {
-  error (_("Use the \"run\" command to start a Unix child process."));
+  error (_("Use the \"run\" command to start a child process."));
 }
 
 static void
@@ -398,8 +398,8 @@ inf_child_target (void)
   struct target_ops *t = XCNEW (struct target_ops);
 
   t->to_shortname = "child";
-  t->to_longname = "Unix child process";
-  t->to_doc = "Unix child process (started by the \"run\" command).";
+  t->to_longname = "Child process";
+  t->to_doc = "Child process (started by the \"run\" command).";
   t->to_open = inf_child_open;
   t->to_post_attach = inf_child_post_attach;
   t->to_fetch_registers = inf_child_fetch_inferior_registers;
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 73c33ba..b63955e 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -747,10 +747,10 @@ gdb_test "step" "The program is not being run." "step #2"
 gdb_test "symbol-file" ".*" "symbol-file"
 
 #test target child
-gdb_test "target child" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
+gdb_test "target child" "Use the \"run\" command to start a child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
 
 #test target procfs
-gdb_test "target procfs" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
+gdb_test "target procfs" "Use the \"run\" command to start a child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
 
 #test target core
 send_gdb "target core\n"
-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Don't mention "Unix" in native target name.
  2014-03-12 12:38 [PATCH] Don't mention "Unix" in native target name Pedro Alves
@ 2014-03-12 13:16 ` Gary Benson
  2014-03-13  0:13   ` Doug Evans
  2014-03-12 13:37 ` Rename Solaris's target to "target child" like most other ports Pedro Alves
  1 sibling, 1 reply; 7+ messages in thread
From: Gary Benson @ 2014-03-12 13:16 UTC (permalink / raw)
  To: gdb-patches

Pedro Alves wrote:
> I wonder whether anyone would miss this badly?  The difference would be:
> 
>   (gdb) maint print target-stack
>   The current target stack is:
>    - multi-thread (multi-threaded child process.)
> -  - child (Unix child process)
> +  - child (Child process)
>    - exec (Local exec file)
>    - None (None)
> 
>  (gdb) help target child
> - Unix child process (started by the "run" command).
> + Child process (started by the "run" command).
> 
> I find it unnecessary (and really slightly a lie) on GNU/Linux.
> 
> It's also odd that e.g., the Windows port says "Unix" in reaction to
> "target child" (it was already that way before Windows used
> inf-child.c).
> 
> How about we just say the same mostly everywhere?

I'm all for this.  

> In the same vein, I'd also rename Solaris/procfs.c's "target procfs"
> to "target child".

Ditto.

Cheers,
Gary

-- 
http://gbenson.net/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Rename Solaris's target to "target child" like most other ports.
  2014-03-12 12:38 [PATCH] Don't mention "Unix" in native target name Pedro Alves
  2014-03-12 13:16 ` Gary Benson
@ 2014-03-12 13:37 ` Pedro Alves
  2014-03-13  7:39   ` Joel Brobecker
  1 sibling, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2014-03-12 13:37 UTC (permalink / raw)
  To: gdb-patches

On 03/12/2014 12:37 PM, Pedro Alves wrote:
> I wonder whether anyone would miss this badly?  The difference would be:
> 
>   (gdb) maint print target-stack
>   The current target stack is:
>    - multi-thread (multi-threaded child process.)
> -  - child (Unix child process)
> +  - child (Child process)
>    - exec (Local exec file)
>    - None (None)
> 
>  (gdb) help target child
> - Unix child process (started by the "run" command).
> + Child process (started by the "run" command).
> 
> I find it unnecessary (and really slightly a lie) on GNU/Linux.
> 
> It's also odd that e.g., the Windows port says "Unix" in reaction to
> "target child" (it was already that way before Windows used
> inf-child.c).
> 
> How about we just say the same mostly everywhere?
> 
> In the same vein, I'd also rename Solaris/procfs.c's "target procfs"
> to "target child".

Like this.  (Untested.)

-------
[PATCH] Rename Solaris's target to "target child" like most other
 ports.

Note that "target procfs" is used by QNX, but the test must be failing
there, as nto-procfs.c overrides to_open with a method that doesn't
throw the error being tested.  So I'm just removing the test
completely.

gdb/
2014-03-12  Pedro Alves  <palves@redhat.com>

	* procfs.c (procfs_target): Don't override to_shortname,
	to_longname or to_doc.

gdb/testsuite/
2014-03-12  Pedro Alves  <palves@redhat.com>

	* gdb.base/default.exp: Don't test "target procfs".
---
 gdb/procfs.c                       | 4 ----
 gdb/testsuite/gdb.base/default.exp | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/gdb/procfs.c b/gdb/procfs.c
index 8204747..f0d65d2 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -184,10 +184,6 @@ procfs_target (void)
 {
   struct target_ops *t = inf_child_target ();
 
-  t->to_shortname = "procfs";
-  t->to_longname = "Unix /proc child process";
-  t->to_doc =
-    "Unix /proc child process (started by the \"run\" command).";
   t->to_create_inferior = procfs_create_inferior;
   t->to_kill = procfs_kill_inferior;
   t->to_mourn_inferior = procfs_mourn_inferior;
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index b63955e..a39ffcf 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -749,9 +749,6 @@ gdb_test "symbol-file" ".*" "symbol-file"
 #test target child
 gdb_test "target child" "Use the \"run\" command to start a child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
 
-#test target procfs
-gdb_test "target procfs" "Use the \"run\" command to start a child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
-
 #test target core
 send_gdb "target core\n"
 gdb_expect {
-- 
1.7.11.7



-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Don't mention "Unix" in native target name.
  2014-03-12 13:16 ` Gary Benson
@ 2014-03-13  0:13   ` Doug Evans
  2014-03-13 12:30     ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Doug Evans @ 2014-03-13  0:13 UTC (permalink / raw)
  To: Gary Benson, Pedro Alves; +Cc: gdb-patches

On Wed, Mar 12, 2014 at 6:16 AM, Gary Benson <gbenson@redhat.com> wrote:
> Pedro Alves wrote:
>> I wonder whether anyone would miss this badly?  The difference would be:
>>
>>   (gdb) maint print target-stack
>>   The current target stack is:
>>    - multi-thread (multi-threaded child process.)
>> -  - child (Unix child process)
>> +  - child (Child process)
>>    - exec (Local exec file)
>>    - None (None)
>>
>>  (gdb) help target child
>> - Unix child process (started by the "run" command).
>> + Child process (started by the "run" command).
>>
>> I find it unnecessary (and really slightly a lie) on GNU/Linux.
>>
>> It's also odd that e.g., the Windows port says "Unix" in reaction to
>> "target child" (it was already that way before Windows used
>> inf-child.c).
>>
>> How about we just say the same mostly everywhere?
>
> I'm all for this.
>
>> In the same vein, I'd also rename Solaris/procfs.c's "target procfs"
>> to "target child".
>
> Ditto.

+1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rename Solaris's target to "target child" like most other ports.
  2014-03-12 13:37 ` Rename Solaris's target to "target child" like most other ports Pedro Alves
@ 2014-03-13  7:39   ` Joel Brobecker
  2014-03-13 12:32     ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2014-03-13  7:39 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> Like this.  (Untested.)
> 
> -------
> [PATCH] Rename Solaris's target to "target child" like most other
>  ports.
> 
> Note that "target procfs" is used by QNX, but the test must be failing
> there, as nto-procfs.c overrides to_open with a method that doesn't
> throw the error being tested.  So I'm just removing the test
> completely.
> 
> gdb/
> 2014-03-12  Pedro Alves  <palves@redhat.com>
> 
> 	* procfs.c (procfs_target): Don't override to_shortname,
> 	to_longname or to_doc.
> 
> gdb/testsuite/
> 2014-03-12  Pedro Alves  <palves@redhat.com>
> 
> 	* gdb.base/default.exp: Don't test "target procfs".

FWIW, this looks good to commit to me, even if untested. In the very
unlikely even that it does break somethhing, I will take care of it
then.

-- 
Joel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Don't mention "Unix" in native target name.
  2014-03-13  0:13   ` Doug Evans
@ 2014-03-13 12:30     ` Pedro Alves
  0 siblings, 0 replies; 7+ messages in thread
From: Pedro Alves @ 2014-03-13 12:30 UTC (permalink / raw)
  To: gdb-patches; +Cc: Doug Evans, Gary Benson

On 03/13/2014 12:13 AM, Doug Evans wrote:
> On Wed, Mar 12, 2014 at 6:16 AM, Gary Benson <gbenson@redhat.com> wrote:
>> Pedro Alves wrote:
>>> How about we just say the same mostly everywhere?
>>
>> I'm all for this.
>>
>>> In the same vein, I'd also rename Solaris/procfs.c's "target procfs"
>>> to "target child".
>>
>> Ditto.
> 
> +1

Thanks guys.  Judging from the quick positive reactions, seems
like everyone's in favor, so I've pushed this in.

---------
[PATCH] Don't mention "Unix" in native target name.

I find the mention of "Unix" unnecessary (and really slightly a lie)
on GNU/Linux in a couple of places:

 (gdb) maint print target-stack
 The current target stack is:
  - multi-thread (multi-threaded child process.)
  - child (Unix child process)
  - exec (Local exec file)
  - None (None)

 (gdb) help target child
 Unix child process (started by the "run" command).

 (gdb) target child
 Use the "run" command to start a Unix child process.

It's also odd that e.g., the Windows port says "Unix" in reaction to
"target child" (it was already that way before Windows used
inf-child.c):

 (gdb) target child
 Use the "run" command to start a Unix child process.
 (gdb)

So drop "Unix", going in the direction of saying mostly the same on
all native targets:

  (gdb) maint print target-stack
  The current target stack is:
   - multi-thread (multi-threaded child process.)
 - - child (Unix child process)
 + - child (Child process)
   - exec (Local exec file)
   - None (None)

  (gdb) help target child
 - Unix child process (started by the "run" command).
 + Child process (started by the "run" command).

 (gdb) target child
 -Use the "run" command to start a Unix child process.
 +Use the "run" command to start a child process.

gdb/
2014-03-13  Pedro Alves  <palves@redhat.com>

	* inf-child.c (inf_child_open, inf_child_target): Don't mention
	Unix in user visible strings.

gdb/testsuite/
2014-03-13  Pedro Alves  <palves@redhat.com>

	* gdb.base/default.exp: Update "target child" and "target procfs"
	tests to not expect "Unix".
---
 gdb/ChangeLog                      | 5 +++++
 gdb/inf-child.c                    | 6 +++---
 gdb/testsuite/ChangeLog            | 5 +++++
 gdb/testsuite/gdb.base/default.exp | 4 ++--
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b1f4b50..8ce0f98 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-13  Pedro Alves  <palves@redhat.com>
+
+	* inf-child.c (inf_child_open, inf_child_target): Don't mention
+	Unix in user visible strings.
+
 2014-03-12  Stan Shebs  <stan@codesourcery.com>
 
 	* gdbtypes.h: Annotate comments for Doxygen, add a page
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index c6483f9..cc16b40 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -112,7 +112,7 @@ inf_child_prepare_to_store (struct target_ops *self,
 static void
 inf_child_open (char *arg, int from_tty)
 {
-  error (_("Use the \"run\" command to start a Unix child process."));
+  error (_("Use the \"run\" command to start a child process."));
 }
 
 static void
@@ -407,8 +407,8 @@ inf_child_target (void)
   struct target_ops *t = XCNEW (struct target_ops);
 
   t->to_shortname = "child";
-  t->to_longname = "Unix child process";
-  t->to_doc = "Unix child process (started by the \"run\" command).";
+  t->to_longname = "Child process";
+  t->to_doc = "Child process (started by the \"run\" command).";
   t->to_open = inf_child_open;
   t->to_post_attach = inf_child_post_attach;
   t->to_fetch_registers = inf_child_fetch_inferior_registers;
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5180a25..7e7cb67 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-13  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/default.exp: Update "target child" and "target procfs"
+	tests to not expect "Unix".
+
 2014-03-12  Tom Tromey  <tromey@redhat.com>
 
 	* gdb.base/corefile.exp (corefile_test_run, corefile_test_attach):
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 73c33ba..b63955e 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -747,10 +747,10 @@ gdb_test "step" "The program is not being run." "step #2"
 gdb_test "symbol-file" ".*" "symbol-file"
 
 #test target child
-gdb_test "target child" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
+gdb_test "target child" "Use the \"run\" command to start a child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
 
 #test target procfs
-gdb_test "target procfs" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
+gdb_test "target procfs" "Use the \"run\" command to start a child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
 
 #test target core
 send_gdb "target core\n"
-- 
1.7.11.7



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Rename Solaris's target to "target child" like most other ports.
  2014-03-13  7:39   ` Joel Brobecker
@ 2014-03-13 12:32     ` Pedro Alves
  0 siblings, 0 replies; 7+ messages in thread
From: Pedro Alves @ 2014-03-13 12:32 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On 03/13/2014 07:39 AM, Joel Brobecker wrote:
>> Like this.  (Untested.)
>>
>> -------
>> [PATCH] Rename Solaris's target to "target child" like most other
>>  ports.
>>
>> Note that "target procfs" is used by QNX, but the test must be failing
>> there, as nto-procfs.c overrides to_open with a method that doesn't
>> throw the error being tested.  So I'm just removing the test
>> completely.
>>
>> gdb/
>> 2014-03-12  Pedro Alves  <palves@redhat.com>
>>
>> 	* procfs.c (procfs_target): Don't override to_shortname,
>> 	to_longname or to_doc.
>>
>> gdb/testsuite/
>> 2014-03-12  Pedro Alves  <palves@redhat.com>
>>
>> 	* gdb.base/default.exp: Don't test "target procfs".
> 
> FWIW, this looks good to commit to me, even if untested. In the very
> unlikely even that it does break somethhing, I will take care of it
> then.

Thanks Joel.  Pushed.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-13 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 12:38 [PATCH] Don't mention "Unix" in native target name Pedro Alves
2014-03-12 13:16 ` Gary Benson
2014-03-13  0:13   ` Doug Evans
2014-03-13 12:30     ` Pedro Alves
2014-03-12 13:37 ` Rename Solaris's target to "target child" like most other ports Pedro Alves
2014-03-13  7:39   ` Joel Brobecker
2014-03-13 12:32     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox