This is the mail archive of the gdb-patches@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]

[PATCH 0/2] prevent gdb.Frame/Objfile and other types to be instanciated


Hello,

as discussed in http://sourceware.org/ml/gdb-patches/2013-08/msg00848.html
the gdb/python interface exposes types which should not be instanciated
directly by python code. This patch now raising a TypeError if one instanciate
such type.

Test results:

$ make check RUNTESTFLAGS="--directory=gdb.python"

                === gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../gdb/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
[...]
                === gdb Summary ===

# of expected passes            1705

 -Sanimir


Sanimir Agovic (2):
  python: disallow python code to instanciate certain types
  test: ensure certain types exposed to python are not instancable

 gdb/python/py-arch.c                      |    1 -
 gdb/python/py-block.c                     |    1 -
 gdb/python/py-frame.c                     |    1 -
 gdb/python/py-objfile.c                   |   35 +----------------------------
 gdb/python/py-progspace.c                 |   35 +----------------------------
 gdb/python/py-symtab.c                    |    2 -
 gdb/testsuite/gdb.python/py-arch.exp      |    2 +
 gdb/testsuite/gdb.python/py-block.exp     |    2 +
 gdb/testsuite/gdb.python/py-frame.exp     |    2 +
 gdb/testsuite/gdb.python/py-inferior.exp  |    2 +
 gdb/testsuite/gdb.python/py-infthread.exp |    2 +
 gdb/testsuite/gdb.python/py-progspace.exp |    4 +++
 gdb/testsuite/gdb.python/py-symtab.exp    |    3 ++
 gdb/testsuite/gdb.python/py-type.exp      |    2 +
 gdb/testsuite/lib/gdb-python.exp          |   14 +++++++++++
 15 files changed, 35 insertions(+), 73 deletions(-)


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