Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] stept, nextt, finisht, untilt, continuet
Date: Tue, 30 Aug 2011 17:00:00 -0000	[thread overview]
Message-ID: <m3ei02dect.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110830014851.78030246131@ruffy.mtv.corp.google.com> (Doug	Evans's message of "Mon, 29 Aug 2011 18:48:51 -0700 (PDT)")

>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> Sometimes I want to run with scheduler-locking on, but having to
Doug> turn it on, perform the command, and remember to turn it off
Doug> afterwards is annoying.

Doug> Another way to go would be to add a "-t" option to these commands.

I was experimenting with generic prefix commands, e.g. "verbose".  I
think of them as adverbs.  This is just food for thought, I am ok with
any of these approaches.

Tom

import gdb

class VerboseCmd(gdb.Command):
    def __init__(self, name):
        gdb.Command.__init__(self, name, gdb.COMMAND_SUPPORT)

    def invoke(self, arg, from_tty):
        if gdb.parameter('verbose'):
            save = 'on'
        else:
            save = 'off'
        gdb.execute('set verbose on', to_string = True)
        try:
            gdb.execute(arg, from_tty)
        finally:
            gdb.execute('set verbose ' + save, to_string = True)

VerboseCmd('verbose')


      parent reply	other threads:[~2011-08-30 17:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30  1:49 Doug Evans
2011-08-30  9:16 ` Jan Kratochvil
2011-08-30 10:01   ` pfee
2011-08-30 11:56     ` Jan Kratochvil
2011-08-30 12:42       ` pfee
2011-08-30 14:21         ` Jan Kratochvil
2011-08-30 15:09           ` Doug Evans
2011-08-30 15:22             ` Pedro Alves
2011-08-30 17:13               ` Tom Tromey
2011-08-30 17:29                 ` Pedro Alves
2011-09-02 16:48               ` Doug Evans
2011-08-30 17:00 ` Tom Tromey [this message]

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=m3ei02dect.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=dje@google.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