This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/10790] New: gdb.parameter not (easily) modifyable from python side


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]