From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6386 invoked by alias); 19 Feb 2013 05:36:07 -0000 Received: (qmail 6274 invoked by uid 22791); 19 Feb 2013 05:36:06 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ee0-f43.google.com (HELO mail-ee0-f43.google.com) (74.125.83.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Feb 2013 05:36:01 +0000 Received: by mail-ee0-f43.google.com with SMTP id c50so3272320eek.2 for ; Mon, 18 Feb 2013 21:36:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=00CtxHvhjTZ07qMduyH5glD2zkufGaRIhF2vo2sInLE=; b=bbEypdWqPadFwefdJXCQq3D3y9A2Sn34XFRB9poffBBtvfr+LBxoCWT79yHeJ6aFJb i7nu2GJIblyLkYy2liTTxIr4lzgbtooQuqWxKl+VDvsi7IICbkWzkKQlyIwwgBju5AJL iASnf3HBg3XtajmujJLbqs7oFnrt0XMT0ZDJUO8p86QdClFxZN/194egPyg34G58fANX dYTC1v5IOq9XxRmzFVdztvIrz86QzPJbN8KB5CngzNGeaxTMBr8obq0YNK6K7MhuzMjj hwnh61Nve4aHKLzoyVZjxLWsgZ/g8M+BFyPRPdp6e9W1ParfknS0WLnzybmWOwW3Th7N ugbA== MIME-Version: 1.0 X-Received: by 10.14.178.69 with SMTP id e45mr53253073eem.9.1361252160178; Mon, 18 Feb 2013 21:36:00 -0800 (PST) Received: by 10.14.207.195 with HTTP; Mon, 18 Feb 2013 21:36:00 -0800 (PST) In-Reply-To: <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> <83a9r4sl04.fsf@gnu.org> Date: Tue, 19 Feb 2013 05:36:00 -0000 Message-ID: Subject: Re: [RFC - Python Scripting] New method gdb.Architecture.disassemble From: Siva Chandra To: Eli Zaretskii Cc: gdb-patches@sourceware.org, dje@google.com, tromey@redhat.com Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkUlMCeDIwlzoJpupR+3WHkkE6rq29i87XJZGzbvcGReZhTAPsXF1VlvsfcRDX5e6Ay99fS16GllKfvkhmpGI9lOW+vI9VeXlmSR/1wZ6ZTESPFM/yutN5ClO/ikw6jxr36QjiGyFYXcVIPbxd2nxMa5L026KZzCLF4NYjGMeVdbazmInfuko3tDNAJvzLhBMMaSgWIiQlYhD8IOTllHou+kKMf5A== 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/msg00487.txt.bz2 On Sat, Feb 16, 2013 at 12:47 AM, Eli Zaretskii wrote: >> +@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. > One can specify all three arguments. Does the description anywhere indicate otherwise? >> 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. I am not saying that the list is a dict, but that the elements of the list are dicts. Should it be worded in another fashion? Thanks, Siva Chandra