Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [RFC/WIP PATCH v2 14/12] experiment with "scope"
Date: Sat, 17 Dec 2011 08:49:00 -0000	[thread overview]
Message-ID: <201112170307.56996.pedro@codesourcery.com> (raw)
In-Reply-To: <20111217025904.22456.50717.stgit@localhost6.localdomain6>

On Saturday 17 December 2011 02:59:04, Pedro Alves wrote:
> The name of this new concept is still up for grabs.  Let me repeat a
> bit of the discussion on the v1 series on the topic here:
> 
>   Tromey wrote:
>   > Pedro> IPTC sets are a collection of arbitrarily many processes,
>   > Pedro> threads, and cores.
>   > 
>   > I wish we had a better name.
>   > 
>   > The current name seems to gain a letter with every new thread on the
>   > topic :-)
> 
>   That was kind of on purpose.  :-)
> 
>   The best name I could think of is "scope".  If we call these things
>   scopes, we can also rename the itfocus command to "scope", which can
>   be abbreviated as "sc".  ("s" is already step, obviously).  It's spelled
>   itfocus currently because "focus" was already taken by the TUI.
> 
>   It looks like this:
> 
>   curinf> scope t3 break -stop i1 main
>   Breakpoint 2 at 0x40068c: file threads.c, line 35.
>   curinf> scope i1
>   Current inferior is 1.
>   i1> sc all
>   Current inferior is 1.
>   all>
>   
>   WDYT?

I wrote this patch to try out how it feels to use "scope" for things.
Also not in git.

-- 
Pedro Alves

---

 gdb/infrun.c |    2 +-
 gdb/itset.c  |   20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index c3e6d0d..89cb51a 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1647,7 +1647,7 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
 }
 
 /* True if execution commands resume all threads of all processes in
-   the current focus by default; otherwise, resume only threads of the
+   the current scope by default; otherwise, resume only threads of the
    current inferior process.  */
 int sched_multi = 1;
 
diff --git a/gdb/itset.c b/gdb/itset.c
index d65cc37..8ea89aa 100644
--- a/gdb/itset.c
+++ b/gdb/itset.c
@@ -1521,7 +1521,7 @@ make_cleanup_itset_free (struct itset *itset)
 static struct itset_elt *parse_neg (char **spec);
 static struct itset_elt *parse_parens_set (char **spec);
 static struct itset_elt *parse_itset_one (char **spec);
-static struct itset_elt *parse_current_focus (char **spec);
+static struct itset_elt *parse_current_scope (char **spec);
 
 static int
 valid_spec_end (char *spec)
@@ -1554,7 +1554,7 @@ parse_elem (char **spec)
   if (elt != NULL)
     return elt;
 
-  elt = parse_current_focus (spec);
+  elt = parse_current_scope (spec);
   if (elt != NULL)
     return elt;
 
@@ -1581,7 +1581,7 @@ parse_neg (char **spec)
 }
 
 static struct itset_elt *
-parse_current_focus (char **spec)
+parse_current_scope (char **spec)
 {
   struct itset_elt_itset *itset_elt;
 
@@ -2026,7 +2026,7 @@ switch_to_itset (struct itset *itset)
   int inf_count;
 
   /* For now, set a current inferior from the first element of the
-     focus set.  */
+     scope set.  */
   inf = iterate_over_itset_inferiors (itset, first_inferior, NULL);
   if (inf == NULL)
     {
@@ -2073,7 +2073,7 @@ switch_to_itset (struct itset *itset)
 }
 
 static void
-itfocus_command (char *spec, int from_tty)
+scope_command (char *spec, int from_tty)
 {
   struct itset *itset;
   struct cleanup *old_chain;
@@ -2081,11 +2081,11 @@ itfocus_command (char *spec, int from_tty)
   if (spec == NULL)
     {
       if (current_itset)
-	printf_filtered (_("Focus is `%s' (current inferior is %d)"),
+	printf_filtered (_("Scope is `%s' (current inferior is %d)"),
 			 current_itset->spec,
 			 current_inferior ()->num);
       else
-	printf_filtered (_("No focus has been set. (current inferior is %d)"),
+	printf_filtered (_("No scope has been set. (current inferior is %d)"),
 			 current_inferior ()->num);
       printf_filtered ("\n");
       return;
@@ -2111,7 +2111,7 @@ itfocus_command (char *spec, int from_tty)
     }
 
   if (itset_is_empty (itset))
-    warning (_("focus set is empty"));
+    warning (_("scope set is empty"));
 
   discard_cleanups (old_chain);
 
@@ -2120,7 +2120,7 @@ itfocus_command (char *spec, int from_tty)
 
   switch_to_itset (itset);
 
-  /* Confirm the choice of focus.  */
+  /* Confirm the choice of scope.  */
   printf_filtered (_("Current inferior is %d.\n"), current_inferior ()->num);
 }
 
@@ -2515,7 +2515,7 @@ _initialize_itset (void)
 
   current_itset = itset_reference (curinf_itset);
 
-  add_com ("itfocus", no_class, itfocus_command, _("\
+  add_com ("scope", no_class, scope_command, _("\
 Change the set of current inferiors/threads."));
 
   add_com ("defset", no_class, defset_command, _("\


  parent reply	other threads:[~2011-12-17  3:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17  2:59 [RFC/WIP I/T sets V2 PATCH 00/14] I/T sets Pedro Alves
2011-12-17  2:59 ` [RFC/WIP PATCH v2 03/12] manythreads.exp: Adjust to handle threads appearing/disappearing after "Program received signal SIGFOO" Pedro Alves
2011-12-17  2:59 ` [RFC/WIP PATCH v2 01/12] Flip to set target-async on by default Pedro Alves
2011-12-23 18:04   ` Marc Khouzam
2011-12-17  3:00 ` [RFC/WIP PATCH v2 11/12] Default the current itset to the current inferior set (curset) Pedro Alves
2011-12-17  3:00 ` [RFC/WIP PATCH v2 07/12] Expand %ITSET% and %THREAD% in the prompt Pedro Alves
2011-12-17  3:00 ` [RFC/WIP PATCH v2 04/12] ia64-sigill.exp: Don't assume there's no infrun output after " Pedro Alves
2011-12-17  3:05 ` [RFC/WIP PATCH v2 08/12] I/T set support for breakpoints - trigger set, and stop set Pedro Alves
2011-12-17  3:07 ` [RFC/WIP PATCH v2 13/12] Comment out new info breakpoints output, in order to not break the test suite Pedro Alves
2011-12-17  3:08 ` [RFC/WIP PATCH v2 12/12] Default "set schedule-multiple" to on Pedro Alves
2011-12-17  8:49 ` Pedro Alves [this message]
2011-12-17 12:35 ` [RFC/WIP PATCH v2 02/14] Implement all-stop on top of a target running non-stop mode Pedro Alves
2011-12-17 12:37 ` [RFC/WIP PATCH v2 06/14] Add base itsets support Pedro Alves
2011-12-17 12:37 ` [RFC/WIP PATCH v2 05/14] watchthreads-reorder.exp: Don't assume there's no infrun output after the prompt Pedro Alves
2011-12-17 12:38 ` [RFC/WIP PATCH v2 09/14] Add I/T set support to most execution commands Pedro Alves
2011-12-17 14:05 ` [RFC/WIP PATCH v2 10/14] Parallel steps, wait for all threads to reach their goal Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201112170307.56996.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox