This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [python] find_line_pc_range
> Date: Mon, 4 Jul 2011 03:50:11 -0700
> From: Matt Rice <ratmice@gmail.com>
> Cc: pmuldoon@redhat.com, gdb-patches@sourceware.org
>
> >> +@defmethod Symtab_and_line find_line_pc_range
> >> +If found returns a @code{Tuple} containing the start and end program counter
> >> +addresses for the line attribute. ?Otherwise returns @code{None}.
> >
> > Sorry, I don't understand what you are trying to say here.
> > ?"If found"
> > what?
>
> Sorry, I abhor writing.
> find_line_pc_range will not find a range in cases where
> the code is not associated with a line (no debug symbols), or the line
> is not associated with code (ifdef'd out or something).
>
> > ?And what "line attribute" do you refer to?
>
> this thing:
> — Instance Variable of Symtab_and_line: line
>
> Indicates the current line number for this object. This attribute is
> not writable.
Thanks for explaining. I would rephrase as follows:
Attempt to find the range of program counter addresses for the
@code{line} attribute of the @code{Symtab_and_line} object. If
found, return a @code{Tuple} containing the start and end addresses
for the line. Otherwise (e.g., a line with no corresponding code or
not present in the debug info), return @code{None}.