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.
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 ();
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 ();
}
= 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 ();
}