diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-12-03 20:39:57 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-12-03 20:43:19 -0500 |
commit | fb2a515fd07be61a9deda0ebfe9507f8000d93cc (patch) | |
tree | 3475a2cc90663c987118e61ad4f03c9cf3efd260 | |
parent | 17ebe2080050d8855070d05bba1a580e54251d0d (diff) | |
download | binutils-fb2a515fd07be61a9deda0ebfe9507f8000d93cc.zip binutils-fb2a515fd07be61a9deda0ebfe9507f8000d93cc.tar.gz binutils-fb2a515fd07be61a9deda0ebfe9507f8000d93cc.tar.bz2 |
gdb: revert one array_view copy change in ada-lang.c
Commit 4bce7cdaf481 ("gdbsupport: add array_view copy function") caused
an internal error when running gdb.ada/packed_array_assign.exp:
print pra(1) := pr^M
/home/smarchi/src/binutils-gdb/gdb/../gdbsupport/array-view.h:217: internal-error: copy: Assertion `dest.size () == src.size ()' failed.^M
I am not sure what's the root cause of this, whether it is a GDB bug
exposed by using the array_view copy function or not. Back out the
change that triggers the internal error for now, while we investigate
it.
Change-Id: I055ab14143e4cfd3ca7ce8f4855c6c3c05db52a7
-rw-r--r-- | gdb/ada-lang.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c6cefe9..f8ba05b 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2586,7 +2586,9 @@ ada_value_assign (struct value *toval, struct value *fromval) write_memory_with_notification (to_addr, buffer, len); val = value_copy (toval); - copy (value_contents (fromval), value_contents_raw (val)); + memcpy (value_contents_raw (val).data (), + value_contents (fromval).data (), + TYPE_LENGTH (type)); deprecated_set_value_type (val, type); return val; |