aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-infthread.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-24 13:40:38 +0200
committerTom de Vries <tdevries@suse.de>2023-08-24 13:40:38 +0200
commit1f08d324601ef7fd4cce3cff8f8db4a774791828 (patch)
treef5dc02b94c0fe17232557d8bf24b9f705a7ba337 /gdb/python/py-infthread.c
parentf1917fc63166d73a9d0930d96468e486a49c666d (diff)
downloadbinutils-1f08d324601ef7fd4cce3cff8f8db4a774791828.zip
binutils-1f08d324601ef7fd4cce3cff8f8db4a774791828.tar.gz
binutils-1f08d324601ef7fd4cce3cff8f8db4a774791828.tar.bz2
[gdb/build] Return gdb::array_view in thread_info_to_thread_handle
In remote_target::thread_info_to_thread_handle we return a copy: ... gdb::byte_vector remote_target::thread_info_to_thread_handle (struct thread_info *tp) { remote_thread_info *priv = get_remote_thread_info (tp); return priv->thread_handle; } ... Fix this by returning a gdb::array_view instead: ... gdb::array_view<const gdb_byte> remote_target::thread_info_to_thread_handle (struct thread_info *tp) ... Tested on x86_64-linux. This fixes the build when building with -std=c++20. Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/python/py-infthread.c')
-rw-r--r--gdb/python/py-infthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 1bd25d0..00d7171 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -291,8 +291,8 @@ thpy_thread_handle (PyObject *self, PyObject *args)
thread_object *thread_obj = (thread_object *) self;
THPY_REQUIRE_VALID (thread_obj);
- gdb::byte_vector hv;
-
+ gdb::array_view<const gdb_byte> hv;
+
try
{
hv = target_thread_info_to_thread_handle (thread_obj->thread);