summaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2021-05-08 18:11:12 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2023-04-29 14:55:08 +0200
commitbdeccf733122b02319516e72dd225c916a216d2c (patch)
treebfa6891dac65050b4ecb628469ad2f29fb16ad29 /gdb/Makefile.in
parent2b8c7766ea357ff9b22531d6fdf0c3bd69cc044f (diff)
downloadbinutils-gdb-bdeccf733122b02319516e72dd225c916a216d2c.tar.gz
Integrate GNU poke in GDBusers/jemarch/poke-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.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 40497541880..a5350635665 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -691,6 +691,9 @@ SER_HARDWIRE = @SER_HARDWIRE@
# This is remote-sim.o if a simulator is to be linked in.
SIM_OBS = @SIM_OBS@
+# Object files to integrate with GNU poke.
+POKE_OBS = @POKE_OBS@
+
# Target-dependent object files.
TARGET_OBS = @TARGET_OBS@
@@ -1617,7 +1620,8 @@ HFILES_WITH_SRCDIR = \
# variables analogous to SER_HARDWIRE which get defaulted in this
# Makefile.in
-DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS)
+DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS) \
+ $(POKE_OBS)
ALLDEPFILES = \
arch/aarch32.c \
@@ -2078,6 +2082,10 @@ install-guile:
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
+install-poke:
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)/$(GDB_DATADIR)/poke
+ $(INSTALL) -m 644 $(srcdir)/poke/gdb.pk $(DESTDIR)/$(GDB_DATADIR)/poke
+
uninstall: force $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \