diff options
author | George Barrett <bob@bob131.so> | 2021-04-29 03:32:37 +1000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2021-05-12 12:35:36 +0100 |
commit | 97cef6b7b79c22a3cc14ef369c1dc09a8bcca357 (patch) | |
tree | fbe15647862a44d89d93cf12e0431bb40a4a38a9 | |
parent | 84139c58642a8a6b857cad1c50420264452882f9 (diff) | |
download | gdb-97cef6b7b79c22a3cc14ef369c1dc09a8bcca357.zip gdb-97cef6b7b79c22a3cc14ef369c1dc09a8bcca357.tar.gz gdb-97cef6b7b79c22a3cc14ef369c1dc09a8bcca357.tar.bz2 |
Guile: improved rvalue reference support
Adds a couple of missing bits to the Guile API to make C++11 rvalue
reference values and types usable from Guile scripts.
gdb/ChangeLog:
* guile/scm-type.c (type_integer_constants): Add binding for
TYPE_CODE_RVALUE_REF.
* guile/scm-value.c (gdbscm_value_referenced_value): Handle
dereferencing of rvalue references.
* NEWS (Guile API): Note improvements in rvalue reference support.
gdb/doc/ChangeLog:
* guile.texi (Types In Guile): Add documentation for
TYPE_CODE_RVALUE_REF.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/NEWS | 7 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/guile.texi | 3 | ||||
-rw-r--r-- | gdb/guile/scm-type.c | 1 | ||||
-rw-r--r-- | gdb/guile/scm-value.c | 1 |
6 files changed, 25 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2423d47..26751d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2021-05-12 George Barrett <bob@bob131.so> + + * guile/scm-type.c (type_integer_constants): Add binding for + TYPE_CODE_RVALUE_REF. + * guile/scm-value.c (gdbscm_value_referenced_value): Handle + dereferencing of rvalue references. + * NEWS (Guile API): Note improvements in rvalue reference support. + 2021-05-12 Markus Metzger <markus.t.metzger@intel.com> * btrace.c (handle_pt_insn_events): Ignore status update enable @@ -200,6 +200,13 @@ QMemTags Request the remote to store the specified allocation tags to the requested memory range. +* Guile API + + ** Improved support for rvalue reference values: + TYPE_CODE_RVALUE_REF is now exported as part of the API and the + value-referenced-value procedure now handles rvalue reference + values. + *** Changes in GDB 10 * There are new feature names for ARC targets: "org.gnu.gdb.arc.core" diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a7714e7..0546f65 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2021-05-12 George Barrett <bob@bob131.so> + + * guile.texi (Types In Guile): Add documentation for + TYPE_CODE_RVALUE_REF. + 2021-05-10 Andrew Burgess <andrew.burgess@embecosm.com> * guile.texinfo (Breakpoints In Guile): Reword sentence. diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi index 6c61379..c3e134b 100644 --- a/gdb/doc/guile.texi +++ b/gdb/doc/guile.texi @@ -1268,6 +1268,9 @@ A pointer-to-member. @item TYPE_CODE_REF A reference type. +@item TYPE_CODE_RVALUE_REF +A C@t{++}11 rvalue reference type. + @item TYPE_CODE_CHAR A character type. diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 8d9c2c5..d65102b 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -1318,6 +1318,7 @@ static const scheme_integer_constant type_integer_constants[] = X (TYPE_CODE_METHODPTR), X (TYPE_CODE_MEMBERPTR), X (TYPE_CODE_REF), + X (TYPE_CODE_RVALUE_REF), X (TYPE_CODE_CHAR), X (TYPE_CODE_BOOL), X (TYPE_CODE_COMPLEX), diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 5999516..f50e8b5 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -476,6 +476,7 @@ gdbscm_value_referenced_value (SCM self) res_val = value_ind (value); break; case TYPE_CODE_REF: + case TYPE_CODE_RVALUE_REF: res_val = coerce_ref (value); break; default: |