Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add missing leading space to some queries
@ 2015-10-28 19:29 Patrick Palka
  2015-10-28 19:59 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Palka @ 2015-10-28 19:29 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patrick Palka

Query strings should have a leading space so that there is some kind of
separator between the actual query and the "(y or n)" suffix that is
appended to the query.

gdb/ChangeLog:

	* linux-record.c (record_linux_system_call): Add a
	leading space to each query string.
	* record-full.c (record_full_check_insn_num): Likewise.
	(record_full_store_registers): Likewise.
	(record_full_xfer_partial): Likewise.
---
 gdb/linux-record.c | 8 ++++----
 gdb/record-full.c  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index cffd4f7..78a8fb1 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -246,7 +246,7 @@ record_linux_system_call (enum gdb_syscall syscall,
         target_terminal_ours ();
         q = yquery (_("The next instruction is syscall exit.  "
                       "It will make the program exit.  "
-                      "Do you want to stop the program?"));
+                      "Do you want to stop the program? "));
         target_terminal_inferior ();
         if (q)
           return 1;
@@ -679,7 +679,7 @@ record_linux_system_call (enum gdb_syscall syscall,
         target_terminal_ours ();
         q = yquery (_("The next instruction is syscall reboot.  "
 		      "It will restart the computer.  "
-		      "Do you want to stop the program?"));
+		      "Do you want to stop the program? "));
         target_terminal_inferior ();
         if (q)
           return 1;
@@ -712,7 +712,7 @@ record_linux_system_call (enum gdb_syscall syscall,
 The next instruction is syscall munmap.\n\
 It will free the memory addr = 0x%s len = %u.\n\
 It will make record target cannot record some memory change.\n\
-Do you want to stop the program?"),
+Do you want to stop the program? "),
                         OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
             target_terminal_inferior ();
             if (q)
@@ -1932,7 +1932,7 @@ Do you want to stop the program?"),
         target_terminal_ours ();
         q = yquery (_("The next instruction is syscall exit_group.  "
                       "It will make the program exit.  "
-                      "Do you want to stop the program?"));
+                      "Do you want to stop the program? "));
         target_terminal_inferior ();
         if (q)
           return 1;
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 595e357..fcba371 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -548,7 +548,7 @@ record_full_check_insn_num (int set_terminal)
 	    target_terminal_ours ();
 	  q = yquery (_("Do you want to auto delete previous execution "
 			"log entries when record/replay buffer becomes "
-			"full (record full stop-at-limit)?"));
+			"full (record full stop-at-limit)? "));
 	  if (set_terminal)
 	    target_terminal_inferior ();
 	  if (q)
@@ -1477,12 +1477,12 @@ record_full_store_registers (struct target_ops *ops,
 	      query (_("Because GDB is in replay mode, changing the "
 		       "value of a register will make the execution "
 		       "log unusable from this point onward.  "
-		       "Change all registers?"));
+		       "Change all registers? "));
 	  else
 	    n =
 	      query (_("Because GDB is in replay mode, changing the value "
 		       "of a register will make the execution log unusable "
-		       "from this point onward.  Change register %s?"),
+		       "from this point onward.  Change register %s? "),
 		      gdbarch_register_name (get_regcache_arch (regcache),
 					       regno));
 
@@ -1534,7 +1534,7 @@ record_full_xfer_partial (struct target_ops *ops, enum target_object object,
 	  /* Let user choose if he wants to write memory or not.  */
 	  if (!query (_("Because GDB is in replay mode, writing to memory "
 		        "will make the execution log unusable from this "
-		        "point onward.  Write memory at address %s?"),
+		        "point onward.  Write memory at address %s? "),
 		       paddress (target_gdbarch (), offset)))
 	    error (_("Process record canceled the operation."));
 
-- 
2.6.2.345.g9f2f344.dirty


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

* Re: [PATCH] Add missing leading space to some queries
  2015-10-28 19:29 [PATCH] Add missing leading space to some queries Patrick Palka
@ 2015-10-28 19:59 ` Pedro Alves
  2015-10-28 20:34   ` Patrick Palka
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-10-28 19:59 UTC (permalink / raw)
  To: Patrick Palka, gdb-patches

On 10/28/2015 04:20 PM, Patrick Palka wrote:
> Query strings should have a leading space so that there is some kind of
> separator between the actual query and the "(y or n)" suffix that is
> appended to the query.
> 

OK.

Though, it would seem better to me to go the other way around and have
query() itself add the space.  E.g. the way it is, translations would
need to know that the space is there to keep, which seems fragile.

Thanks,
Pedro Alves


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

* Re: [PATCH] Add missing leading space to some queries
  2015-10-28 19:59 ` Pedro Alves
@ 2015-10-28 20:34   ` Patrick Palka
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Palka @ 2015-10-28 20:34 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On Wed, Oct 28, 2015 at 1:10 PM, Pedro Alves <palves@redhat.com> wrote:
> On 10/28/2015 04:20 PM, Patrick Palka wrote:
>> Query strings should have a leading space so that there is some kind of
>> separator between the actual query and the "(y or n)" suffix that is
>> appended to the query.
>>
>
> OK.
>
> Though, it would seem better to me to go the other way around and have
> query() itself add the space.  E.g. the way it is, translations would
> need to know that the space is there to keep, which seems fragile.

That makes sense. I'll post a patch tomorrow that does this instead.

>
> Thanks,
> Pedro Alves
>


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

end of thread, other threads:[~2015-10-28 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 19:29 [PATCH] Add missing leading space to some queries Patrick Palka
2015-10-28 19:59 ` Pedro Alves
2015-10-28 20:34   ` Patrick Palka

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