From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11552 invoked by alias); 30 Aug 2013 14:40:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11543 invoked by uid 89); 30 Aug 2013 14:40:17 -0000 Received: from mga03.intel.com (HELO mga03.intel.com) (143.182.124.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2013 14:40:17 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.3.2 X-HELO: mga03.intel.com Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 30 Aug 2013 07:40:13 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 30 Aug 2013 07:40:12 -0700 Received: from ulliclel004.iul.intel.com (ulliclel004.iul.intel.com [172.28.50.125]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r7UEeB65004952; Fri, 30 Aug 2013 15:40:12 +0100 Received: from ulliclel004.iul.intel.com (ulliclel004.iul.intel.com [127.0.0.1]) by ulliclel004.iul.intel.com (8.13.8/8.12.8/MailSET/client) with ESMTP id r7UEeAu5015559; Fri, 30 Aug 2013 16:40:10 +0200 Received: (from sagovic@localhost) by ulliclel004.iul.intel.com (8.13.8/8.13.1/Submit) id r7UEe4Ip015558; Fri, 30 Aug 2013 16:40:04 +0200 From: Sanimir Agovic To: gdb-patches@sourceware.org Cc: pmuldoon@redhat.com Subject: [PATCH 0/2] prevent gdb.Frame/Objfile and other types to be instanciated Date: Fri, 30 Aug 2013 14:40:00 -0000 Message-Id: <1377873604-15519-1-git-send-email-sanimir.agovic@intel.com> X-SW-Source: 2013-08/txt/msg00915.txt.bz2 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(-)