From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1018 invoked by alias); 30 Mar 2012 18:08:20 -0000 Received: (qmail 1004 invoked by uid 22791); 30 Mar 2012 18:08:19 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Mar 2012 18:08:04 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2UI837b023074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Mar 2012 14:08:04 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2UI7w1u011365 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 30 Mar 2012 14:08:00 -0400 Message-ID: <4F75F67E.30609@redhat.com> Date: Fri, 30 Mar 2012 18:08:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: "gdb-patches@sourceware.org ml" Subject: [RFA] Add test for comma in linespec (python) Content-Type: multipart/mixed; boundary="------------040408080904060007020503" X-IsSubscribed: yes 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 X-SW-Source: 2012-03/txt/msg01060.txt.bz2 This is a multi-part message in MIME format. --------------040408080904060007020503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 347 Hi, This adds a simple test to check if gdb.decode_line (and everything underneath that) is properly handling linespecs with commas in them, e.g. "func1,func2". This should return a symtab for func1, but stop processing at ",func2". Ok? Keith 2012-03-30 Keith Seitz * gdb.python: Add test for linespecs with commas. --------------040408080904060007020503 Content-Type: text/x-patch; name="python-comma-linespec.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="python-comma-linespec.patch" Content-length: 998 Index: testsuite/gdb.python/python.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.python/python.exp,v retrieving revision 1.31 diff -u -p -r1.31 python.exp --- testsuite/gdb.python/python.exp 16 Jan 2012 16:21:52 -0000 1.31 +++ testsuite/gdb.python/python.exp 30 Mar 2012 18:04:02 -0000 @@ -182,6 +182,9 @@ gdb_test "python print len(symtab)" "2" gdb_test "python print len(symtab\[1\])" "1" "Test decode_line func1 length" gdb_test "python print symtab\[1\]\[0\].symtab" ".*gdb.python/python-1.c.*" "Test decode_line func1 filename" gdb_test "python print symtab\[1\]\[0\].line" "19" "Test decode_line func1 line number" +gdb_py_test_silent_cmd {python symtab = gdb.decode_line ("func1,func2")} \ + "test decode_line func1,func2" 1 +gdb_test {python print symtab[0]} ",func2" "stop at comma in linespec" # gdb.write gdb_test "python print sys.stderr" ".*__main__.GdbOutputErrorFile instance at.*" "Test stderr location" --------------040408080904060007020503--