public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/15629] New: no access to line table from python
@ 2013-06-14 19:27 tromey at redhat dot com
  2013-07-29 11:52 ` [Bug python/15629] " pmuldoon at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2013-06-14 19:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15629

            Bug ID: 15629
           Summary: no access to line table from python
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at redhat dot com

There is no way to access the line table from Python.
I'd like to have some access so I can determine which
lines in a given source file are executable.
Insight can do this, see gdbtk-cmds.c:gdb_loadfile

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug python/15629] no access to line table from python
  2013-06-14 19:27 [Bug python/15629] New: no access to line table from python tromey at redhat dot com
@ 2013-07-29 11:52 ` pmuldoon at redhat dot com
  2013-07-29 14:54 ` tromey at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2013-07-29 11:52 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15629

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |pmuldoon at redhat dot com
           Assignee|unassigned at sourceware dot org   |pmuldoon at redhat dot com

--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> ---
For this API I was thinking of a simple dictionary returned from a symtab
object.

linetable = foo.linetable()

The dictionary key would be the source line number, and the value would be a
tuple containing all the $pc locations associated with that line number (a line
can have multiple $pc locations for things like the "for" c statement, or
compound commands).

What do you think?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug python/15629] no access to line table from python
  2013-06-14 19:27 [Bug python/15629] New: no access to line table from python tromey at redhat dot com
  2013-07-29 11:52 ` [Bug python/15629] " pmuldoon at redhat dot com
@ 2013-07-29 14:54 ` tromey at redhat dot com
  2013-11-11 19:50 ` cvs-commit at gcc dot gnu.org
  2013-11-11 19:52 ` pmuldoon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2013-07-29 14:54 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15629

--- Comment #2 from Tom Tromey <tromey at redhat dot com> ---
The only concern is that the resulting table may be "too big".  That
is, it's worth looking at what happens if you take this approach with
a large source file -- say, pick the longest one in gdb and try it.
If that result isn't too bad then I think this approach is fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug python/15629] no access to line table from python
  2013-06-14 19:27 [Bug python/15629] New: no access to line table from python tromey at redhat dot com
  2013-07-29 11:52 ` [Bug python/15629] " pmuldoon at redhat dot com
  2013-07-29 14:54 ` tromey at redhat dot com
@ 2013-11-11 19:50 ` cvs-commit at gcc dot gnu.org
  2013-11-11 19:52 ` pmuldoon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-11-11 19:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15629

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  bc79de95db1005e1cefc18729eca9e9d5f771c91 (commit)
      from  67dc82bc511e35ef134952014b4deb2fdcf10676 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bc79de95db1005e1cefc18729eca9e9d5f771c91

commit bc79de95db1005e1cefc18729eca9e9d5f771c91
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon Nov 11 19:49:45 2013 +0000

    2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

        PR python/15629
        * NEWS: Add linetable feature.
        * Makefile.in (SUBDIR_PYTHON_OBS): Add py-linetable entries.
        * python/py-linetable.c: New file.
        * python/py-symtab.c (stpy_get_linetable): New function.
        * python/python-internal.h (symtab_to_linetable_object): Declare.
        (gdbpy_initialize_linetable): Ditto.
        * python/python.c (_initialize_python): Call
        gdbpy_initialize_linetable.

    2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

         * gdb.python/py-linetable.S: New file.
        * gdb.python/py-linetable.c: New file.
         * gdb.python/py-linetable.exp: New file.

    2013-11-11  Phil Muldoon  <pmuldoon@redhat.com>

        * gdb.texinfo (Symbol Tables In Python): Add linetable method entry.
        (Line Tables In Python): New node.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                             |   12 +
 gdb/Makefile.in                           |    6 +
 gdb/NEWS                                  |    1 +
 gdb/doc/ChangeLog                         |    5 +
 gdb/doc/gdb.texinfo                       |   84 ++++
 gdb/python/py-linetable.c                 |  622 +++++++++++++++++++++++++++++
 gdb/python/py-symtab.c                    |   17 +
 gdb/python/python-internal.h              |    4 +-
 gdb/python/python.c                       |    1 +
 gdb/testsuite/ChangeLog                   |    6 +
 gdb/testsuite/gdb.python/py-linetable.S   |  362 +++++++++++++++++
 gdb/testsuite/gdb.python/py-linetable.c   |   46 +++
 gdb/testsuite/gdb.python/py-linetable.exp |   76 ++++
 13 files changed, 1241 insertions(+), 1 deletions(-)
 create mode 100644 gdb/python/py-linetable.c
 create mode 100644 gdb/testsuite/gdb.python/py-linetable.S
 create mode 100644 gdb/testsuite/gdb.python/py-linetable.c
 create mode 100644 gdb/testsuite/gdb.python/py-linetable.exp

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug python/15629] no access to line table from python
  2013-06-14 19:27 [Bug python/15629] New: no access to line table from python tromey at redhat dot com
                   ` (2 preceding siblings ...)
  2013-11-11 19:50 ` cvs-commit at gcc dot gnu.org
@ 2013-11-11 19:52 ` pmuldoon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2013-11-11 19:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15629

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |7.7

--- Comment #4 from Phil Muldoon <pmuldoon at redhat dot com> ---
The code for this feature has been committed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-11 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-14 19:27 [Bug python/15629] New: no access to line table from python tromey at redhat dot com
2013-07-29 11:52 ` [Bug python/15629] " pmuldoon at redhat dot com
2013-07-29 14:54 ` tromey at redhat dot com
2013-11-11 19:50 ` cvs-commit at gcc dot gnu.org
2013-11-11 19:52 ` pmuldoon at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).