[RFC - Python Scripting] Add 'end' attribute to gdb.Symtab_and_line

Siva Chandra sivachandra@google.com
Wed Jun 27 00:23:00 GMT 2012


On Wed, Jun 27, 2012 at 3:42 AM, Doug Evans <dje@google.com> wrote:
>
> On Sun, Jun 24, 2012 at 10:02 AM, Siva Chandra <sivachandra@google.com> wrote:
> > On Fri, Jun 22, 2012 at 10:42 PM, Tom Tromey <tromey@redhat.com> wrote:
> >> It seems that sal->end can be == 0.
> >> For example I think gdb.decode_line can create sals like this.
> >> In this case I think "- 1" will yield weird results.
> >> Perhaps a None return would be better?
> >
> > Done. The patch is attached.
> >
> > 2012-06-24  Siva Chandra Reddy  <sivachandra@google.com>
> >
> >        New attribute 'last' for gdb.Symtab_and_line.
> >        * NEWS (Python Scripting): Add entry about the new attribute.
> >        * python/py-symtab.c (salpy_get_last): New function which
> >        implements the get method for the 'last' attribute of
> >        gdb.Symtab_and_line.
> >        (sal_object_getset): Add entry for the 'last' attribute.
> >
> >        doc/
> >        * gdb.texinfo (Symbol Tables In Python): Add description about
> >        the new 'last' attribute of gdb.Symtab_and line.
> >
> >        testsuite/
> >        * gdb.python/py-symtab.exp: Add tests to test the new attribute
> >        'last' of gdb.Symtab_and_line.
> >        * gdb.python/py-symbol.c: Move break point comment to enable
> >        testing of gdb.Symtab_and_line.last.
> >
> > Thanks,
> > Siva Chandra
>
> LGTM.

Committed.

Thank you.
Siva Chandra



More information about the Gdb-patches mailing list