[PATCHv3 0/3] Python API for target connections, and packet sending

Andrew Burgess andrew.burgess@embecosm.com
Tue Oct 19 10:17:06 GMT 2021


Since v2:

  - Added a gdb.RemoteTargetConnection sub-class, which is used for
    'remote' and 'extended-remote' connections.  The previous
    'send_remote_packet' has become 'send_packet' on this new
    sub-class.

  - Tests and documentation have been updated to reflect the above
    change.

  - In the first patch, connpy_repr has been modified in order to
    prepare it for the sub-class that will appear in the later
    patch.

Since v1:

  - Rebased onto current upstream master and resolved the merge
    conflicts.

  - Addressed the documentation feedback from Eli.  I'm not 100% sure
    that I have correctly addressed the concerns about patch #3, so
    this is probably worth rechecking.


---

Andrew Burgess (3):
  gdb/python: introduce gdb.TargetConnection object type
  gdb: make packet_command function available outside remote.c
  gdb/python: add gdb.RemoteTargetConnection.send_packet

 gdb/Makefile.in                               |   1 +
 gdb/NEWS                                      |  22 +
 gdb/doc/gdb.texinfo                           |   1 +
 gdb/doc/python.texi                           | 114 +++-
 gdb/observable.c                              |   1 +
 gdb/observable.h                              |   3 +
 gdb/python/py-all-events.def                  |   1 +
 gdb/python/py-connection.c                    | 523 ++++++++++++++++++
 gdb/python/py-event-types.def                 |   5 +
 gdb/python/py-inferior.c                      |  16 +
 gdb/python/python-internal.h                  |   6 +
 gdb/python/python.c                           |   5 +
 gdb/remote.c                                  |  67 ++-
 gdb/remote.h                                  |  34 ++
 gdb/target-connection.c                       |   4 +
 .../gdb.multi/multi-target-info-inferiors.exp |  38 ++
 .../gdb.multi/multi-target-info-inferiors.py  |  63 +++
 gdb/testsuite/gdb.python/py-connection.c      |  22 +
 gdb/testsuite/gdb.python/py-connection.exp    |  63 +++
 gdb/testsuite/gdb.python/py-inferior.exp      |  20 +-
 gdb/testsuite/gdb.python/py-send-packet.c     |  22 +
 gdb/testsuite/gdb.python/py-send-packet.exp   |  59 ++
 gdb/testsuite/gdb.python/py-send-packet.py    |  84 +++
 23 files changed, 1148 insertions(+), 26 deletions(-)
 create mode 100644 gdb/python/py-connection.c
 create mode 100644 gdb/testsuite/gdb.multi/multi-target-info-inferiors.py
 create mode 100644 gdb/testsuite/gdb.python/py-connection.c
 create mode 100644 gdb/testsuite/gdb.python/py-connection.exp
 create mode 100644 gdb/testsuite/gdb.python/py-send-packet.c
 create mode 100644 gdb/testsuite/gdb.python/py-send-packet.exp
 create mode 100644 gdb/testsuite/gdb.python/py-send-packet.py

-- 
2.25.4



More information about the Gdb-patches mailing list