]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Integrate GNU poke in GDB users/jemarch/poke-gdb
authorJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 8 May 2021 16:11:12 +0000 (18:11 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 29 Apr 2023 12:55:08 +0000 (14:55 +0200)
commitbdeccf733122b02319516e72dd225c916a216d2c
treebfa6891dac65050b4ecb628469ad2f29fb16ad29
parent2b8c7766ea357ff9b22531d6fdf0c3bd69cc044f
Integrate GNU poke in GDB

This patch integrates GNU poke (http://jemarch.net/poke) in GDB by
mean of libpoke.  It allows the GDB user to execute Poke code from
within the debugger with access to the target memory, types and
values.

How this stuff works:

- GDB links with libpoke.so and uses the interface in libpoke.h.
  This is also how the GNU poke application (the command-line
  editor) is implemented.

- There are three commands:

  poke STR
  poke-add-type EXPR
  poke-add-types REGEXP
  poke-dump-types

  All three commands make sure to start the poke incremental
  compiler if it isn't running already.

- Access to the target's memory is provided by GDB by installing
  a Foreign IO device in the incremental compiler.  This is
  `iod_if' in poke.c.

- Access to the terminal is provided by GDB by providing a
  pk_term_if implementation to the incremental compiler.  This is
  `poke_term_if' in poke.c.

- Access to GDB values is provided by GDB by installing an alien
  token handler in the incremental compiler.  This is
  `poke_alien_token_handler' in poke.c.

gdb/ChangeLog:

2021-05-10  Jose E. Marchesi  <jose.marchesi@oracle.com>

* configure.ac: Support --enable-poke.
* configure: Regenerate.
* Makefile.in (POKE_OBS): Define based on @POKE_OBS@.
(DEPFILES): Add POKE_OBS.
* poke.c: New file.

gdb/doc/ChangeLog:

2021-05-10  Jose E. Marchesi  <jose.marchesi@oracle.com>

* Makefile.in (GDB_DOC_FILES): Add poke.texi.
* poke.texi: New file.
* gdb.texinfo (Data): Add meny entry for Poke and @include poke.texi.
20 files changed:
gdb/ChangeLog-2021
gdb/Makefile.in
gdb/NEWS
gdb/config.in
gdb/configure
gdb/configure.ac
gdb/doc/ChangeLog-1991-2021
gdb/doc/Makefile.in
gdb/doc/gdb.texinfo
gdb/doc/poke.texi [new file with mode: 0644]
gdb/poke.c [new file with mode: 0644]
gdb/poke/gdb.pk [new file with mode: 0644]
gdb/testsuite/gdb.poke/poke-types.c [new file with mode: 0644]
gdb/testsuite/gdb.poke/poke-types.exp [new file with mode: 0644]
gdb/testsuite/lib/gdb.exp
gdb/top.c
intl/aclocal.m4
intl/configure
libiberty/aclocal.m4
libiberty/configure