From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6518 invoked by alias); 16 Feb 2013 08:47:57 -0000 Received: (qmail 6510 invoked by uid 22791); 16 Feb 2013 08:47:57 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Feb 2013 08:47:51 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MIB00L001MRU400@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 16 Feb 2013 10:47:38 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MIB00LKA1RDT820@a-mtaout20.012.net.il>; Sat, 16 Feb 2013 10:47:38 +0200 (IST) Date: Sat, 16 Feb 2013 08:47:00 -0000 From: Eli Zaretskii Subject: Re: [RFC - Python Scripting] New method gdb.Architecture.disassemble In-reply-to: To: Siva Chandra Cc: gdb-patches@sourceware.org, dje@google.com, tromey@redhat.com Reply-to: Eli Zaretskii Message-id: <83a9r4sl04.fsf@gnu.org> References: <20753.38272.55066.651097@ruffy2.mtv.corp.google.com> <87txphmdt3.fsf@fleche.redhat.com> <87r4kkks5g.fsf@fleche.redhat.com> <20763.64197.459891.627211@ruffy2.mtv.corp.google.com> <20765.55532.700460.792597@ruffy2.mtv.corp.google.com> 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: 2013-02/txt/msg00435.txt.bz2 > Date: Fri, 15 Feb 2013 13:00:19 -0800 > From: Siva Chandra > Cc: Doug Evans , Tom Tromey , Eli Zaretskii > > +@defun Architecture.disassemble (@var{start_pc} @r{[}, @var{end_pc} @r{[}, @var{count}@r{]]}) > +Return a list of at most @var{count} disassembled instructions > +whose start address falls in the closed memory address interval from > +@var{start_pc} to @var{end_pc}. If @var{end_pc} is not specified, but > +@var{count} is specified, then @var{count} number of instructions > +starting from the address @var{start_pc} are returned. If @var{count} > +is not specified but @var{end_pc} is specified, then all instructions > +whose start address falls in the closed memory address interval from > +@var{start_pc} to @var{end_pc} are returned. If neither @var{end_pc} > +nor @var{count} are specified, then a single instruction at > +@var{start_pc} is returned. The description of the optional arguments makes sense, but the @defun line is in contradiction with the description, because it says that one can specify all 3 arguments. IOW, there should be a '|' somewhere to signal that either end_pc or count, but not both, could be used. > For all of these cases, the elements of the > +returned list are a Python @code{dict} Does it make sense in Python to talk about a list that is a 'dict'? IOW, is a 'dict' a special case of a list in Python? My reading of http://docs.python.org/2/library/stdtypes.html is that it is not. Otherwise OK. Thanks.