diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-10-05 12:14:32 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-10-06 13:16:16 +0100 |
commit | dd6a9ec16e0ce34a7e8d0ace001f3cc167846892 (patch) | |
tree | 99768dd4709c833516b658a14e95a64634ad9590 /gdbserver | |
parent | fef7f251fecfb5747dae456d2f9b08772f3a3768 (diff) | |
download | gdb-dd6a9ec16e0ce34a7e8d0ace001f3cc167846892.zip gdb-dd6a9ec16e0ce34a7e8d0ace001f3cc167846892.tar.gz gdb-dd6a9ec16e0ce34a7e8d0ace001f3cc167846892.tar.bz2 |
gdbserver: fix gdbserver builds after expedite_regs changes
After this commit:
commit 6a65998a8a94abaaae7ca4ff0ab9c3f25dc2e766
Date: Mon Sep 11 12:42:00 2023 +0100
Convert tdesc's expedite_regs to a string vector
The risc-v, loongarch, and csky gdbserver builds were broken. A use
of target_desc::expedite_regs (for each architecture) was not updated
to take account of the type change.
I've tested that this fixes the risc-v build. I haven't tested the
other architectures, but they should be fine.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/linux-csky-low.cc | 7 | ||||
-rw-r--r-- | gdbserver/linux-loongarch-low.cc | 7 | ||||
-rw-r--r-- | gdbserver/linux-riscv-low.cc | 8 |
3 files changed, 16 insertions, 6 deletions
diff --git a/gdbserver/linux-csky-low.cc b/gdbserver/linux-csky-low.cc index 3117556..feb428e 100644 --- a/gdbserver/linux-csky-low.cc +++ b/gdbserver/linux-csky-low.cc @@ -132,8 +132,11 @@ csky_target::low_arch_setup () static const char *expedite_regs[] = { "r14", "pc", NULL }; target_desc_up tdesc = csky_create_target_description (); - if (!tdesc->expedite_regs) - init_target_desc (tdesc.get (), expedite_regs); + if (tdesc->expedite_regs.empty ()) + { + init_target_desc (tdesc.get (), expedite_regs); + gdb_assert (!tdesc->expedite_regs.empty ()); + } current_process ()->tdesc = tdesc.release (); diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc index ead2e76..3eb87f5 100644 --- a/gdbserver/linux-loongarch-low.cc +++ b/gdbserver/linux-loongarch-low.cc @@ -84,8 +84,11 @@ loongarch_target::low_arch_setup () features.xlen = sizeof (elf_greg_t); tdesc = loongarch_create_target_description (features); - if (!tdesc->expedite_regs) - init_target_desc (tdesc.get (), expedite_regs); + if (tdesc->expedite_regs.empty ()) + { + init_target_desc (tdesc.get (), expedite_regs); + gdb_assert (!tdesc->expedite_regs.empty ()); + } current_process ()->tdesc = tdesc.release (); } diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc index 129bc3b..4c251bb 100644 --- a/gdbserver/linux-riscv-low.cc +++ b/gdbserver/linux-riscv-low.cc @@ -90,8 +90,12 @@ riscv_target::low_arch_setup () = riscv_linux_read_features (lwpid_of (current_thread)); target_desc_up tdesc = riscv_create_target_description (features); - if (!tdesc->expedite_regs) - init_target_desc (tdesc.get (), expedite_regs); + if (tdesc->expedite_regs.empty ()) + { + init_target_desc (tdesc.get (), expedite_regs); + gdb_assert (!tdesc->expedite_regs.empty ()); + } + current_process ()->tdesc = tdesc.release (); } |