diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-02-18 23:35:46 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-02-26 22:59:42 +0100 |
commit | 7a5a839f3a82e23f7745dd9905191716c74e34df (patch) | |
tree | 0bfa29f6b2fd02081e561ad88e9821f72591bbe6 /gdb/testsuite/gdb.guile | |
parent | d763de106f7146d7b972f98c7d0113f80a65e4f5 (diff) | |
download | gdb-7a5a839f3a82e23f7745dd9905191716c74e34df.zip gdb-7a5a839f3a82e23f7745dd9905191716c74e34df.tar.gz gdb-7a5a839f3a82e23f7745dd9905191716c74e34df.tar.bz2 |
guile: Add 'history-append!' procedure.
gdb/
2014-02-26 Ludovic Courtès <ludo@gnu.org>
* guile/scm-value.c (gdbscm_history_append_x): New function.
(value_functions): Add it.
gdb/testsuite/
2014-02-26 Ludovic Courtès <ludo@gnu.org>
* gdb.guile/scm-value.exp (test_value_in_inferior): Add
test for 'history-append!'.
gdb/doc/
2014-02-26 Ludovic Courtès <ludo@gnu.org>
* gdb/doc/guile.texi (Basic Guile): Document 'history-append!'.
Diffstat (limited to 'gdb/testsuite/gdb.guile')
-rw-r--r-- | gdb/testsuite/gdb.guile/scm-value.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp index 3ebdd58..89f0ff1 100644 --- a/gdb/testsuite/gdb.guile/scm-value.exp +++ b/gdb/testsuite/gdb.guile/scm-value.exp @@ -59,6 +59,14 @@ proc test_value_in_inferior {} { gdb_test "gu (print (value-field s \"a\"))" \ "= 3" "access element inside struct using string name" + # Append value in the value history. + gdb_scm_test_silent_cmd "gu (define i (history-append! (make-value 42)))" \ + "append 42" + + gdb_test "gu i" "\[0-9\]+" + gdb_test "gu (history-ref i)" "#<gdb:value 42>" + gdb_test "p \$" "= 42" + # Test dereferencing the argv pointer. # Just get inferior variable argv the value history, available to guile. |