public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/10790] New: gdb.parameter not (easily) modifyable from python side
@ 2009-10-16 18:40 ppluzhnikov at google dot com
  0 siblings, 0 replies; only message in thread
From: ppluzhnikov at google dot com @ 2009-10-16 18:40 UTC (permalink / raw)
  To: gdb-prs

Consider wanting to temporarily change e.g. 'print elements' from (default)
200 to 400 and then restore it back; all from python side.

Currently you'd have to do something like:

  old = gdb.parameter('print elements')
  gdb.execute('set print elements 400')
  ... whatever ...
  gdb.execute('set print elements %d' % old)

It would be much more "pythonic" to have parameters implement a dictionary:

  old = gdb.parameter['print elements']
  gdb.parameter['print elements'] = 400
  ... whatever ...
  gdb.parameter['print elements'] = old

-- 
           Summary: gdb.parameter not (easily) modifyable from python side
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: ppluzhnikov at google dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10790

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-16 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16 18:40 [Bug python/10790] New: gdb.parameter not (easily) modifyable from python side ppluzhnikov at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).