Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: tromey@redhat.com
Cc: brobecker@adacore.com (Joel Brobecker), gdb-patches@sourceware.org
Subject: Re: [RFC/RFA] add struct parse_context to all command functions
Date: Tue, 21 Oct 2008 18:12:00 -0000	[thread overview]
Message-ID: <200810211811.m9LIBW3I020177@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <m3skqqaglh.fsf@fleche.redhat.com> from "Tom Tromey" at Oct 20, 2008 07:20:58 PM

Tom Tromey wrote:

> Also, why pass in this particular subset of globals?  There are lots
> of globals in gdb, used all over.  My view is that commands are by
> their nature singletons (unless you want to support multiple CLIs at
> once of course :-) and so would reasonably access global state even in
> a design from scratch.  IOW, I think it would make sense to only
> bother with global-elimination for layers underneath the command
> functions.

I think it does make sense to make the context where a command is
executed more explicit, so that at some point in the future we might
actually be able to do something like "execute command X on thread Y"
transparently without having to switch global state.  Of course, more
than just Joel's patch will be needed to achieve this ...

> FWIW I also have a vaguely similar reorganization in the wings.  I
> removed all accesses to global variables from the value_print and
> val_print hierarchy, in favor of a "print options" argument.  So, my
> interest in this sort of thing is not totally academic.

Great!  I was just about to start implementing something along those
lines (to pull current_gdbarch out of the print routines) ...  Do you
already have a version of that patch you could share?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  parent reply	other threads:[~2008-10-21 18:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 14:05 Joel Brobecker
2008-10-09 16:13 ` Tom Tromey
2008-10-09 22:20   ` Joel Brobecker
2008-10-20 16:16 ` Joel Brobecker
2008-10-20 19:03   ` Thiago Jung Bauermann
2008-10-21  0:47     ` Daniel Jacobowitz
2008-10-21 18:06       ` Ulrich Weigand
2008-10-21 18:18         ` Daniel Jacobowitz
2008-10-22  1:40           ` Joel Brobecker
2008-10-22 20:15             ` Tom Tromey
2008-10-22 20:36               ` Joel Brobecker
2008-10-21  1:22   ` Tom Tromey
2008-10-21  7:07     ` Joel Brobecker
2008-10-21 18:12     ` Ulrich Weigand [this message]
2008-10-21 18:58       ` Tom Tromey
2008-10-21 19:33       ` Tom Tromey
2008-10-22 18:03         ` Ulrich Weigand
2008-10-22 18:54           ` Tom Tromey
2008-10-22 22:24             ` Ulrich Weigand
2008-10-23  1:02               ` Tom Tromey
2008-10-23 19:50                 ` Ulrich Weigand
2008-10-23 21:29                   ` Tom Tromey
2008-10-24 13:01                     ` Ulrich Weigand
2008-10-25 16:05                       ` Tom Tromey
2008-10-27 17:07                       ` Tom Tromey
2008-10-28 16:27                         ` Ulrich Weigand
2008-10-28 18:17                           ` Tom Tromey
2008-10-28 20:00                             ` Ulrich Weigand
2008-10-25 16:25                     ` Joel Brobecker
2008-10-25 16:46                       ` Tom Tromey
2008-10-26 15:19                         ` Joel Brobecker
2008-10-21 18:05 ` Ulrich Weigand

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=200810211811.m9LIBW3I020177@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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