This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC - Python Scripting] New method gdb.Architecture.disassemble


On Sat, Feb 16, 2013 at 12:47 AM, Eli Zaretskii <eliz@gnu.org> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]