Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] prevent gdb.Frame/Objfile and other types to be instanciated
@ 2013-08-30 14:40 Sanimir Agovic
  2013-08-30 14:40 ` [PATCH 1/2] python: disallow python code to instanciate certain types Sanimir Agovic
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sanimir Agovic @ 2013-08-30 14:40 UTC (permalink / raw)
  To: gdb-patches; +Cc: pmuldoon

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(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-10 19:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 14:40 [PATCH 0/2] prevent gdb.Frame/Objfile and other types to be instanciated Sanimir Agovic
2013-08-30 14:40 ` [PATCH 1/2] python: disallow python code to instanciate certain types Sanimir Agovic
2013-08-30 15:08   ` Phil Muldoon
2013-10-10 19:08     ` Tom Tromey
2013-10-10 19:06   ` Tom Tromey
2013-08-30 14:40 ` [PATCH 2/2] test: ensure certain types exposed to python are not instancable Sanimir Agovic
2013-10-10 19:14   ` Tom Tromey
2013-10-10 19:59     ` Paul_Koning
2013-10-10 19:10 ` [PATCH 0/2] prevent gdb.Frame/Objfile and other types to be instanciated Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox