This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC - Python Scripting] New method gdb.Architecture.disassemble
> Date: Fri, 15 Feb 2013 13:00:19 -0800
> From: Siva Chandra <sivachandra@google.com>
> Cc: Doug Evans <dje@google.com>, Tom Tromey <tromey@redhat.com>, Eli Zaretskii <eliz@gnu.org>
>
> +@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.