diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-10-11 09:31:51 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-10-11 09:31:51 +0100 |
commit | a9ed7a0814fc70feaad485576d043a983b6f8695 (patch) | |
tree | ff1f8d2daf7433e68328028f12258811d35c6e34 /gdbserver | |
parent | d55d7b35c4e64f419532c9a68a32f4952119ee66 (diff) | |
download | gdb-a9ed7a0814fc70feaad485576d043a983b6f8695.zip gdb-a9ed7a0814fc70feaad485576d043a983b6f8695.tar.gz gdb-a9ed7a0814fc70feaad485576d043a983b6f8695.tar.bz2 |
Revert "gdbserver: pass osabi to GDB in target description"
This reverts commit 98bcde5e268ea7cd54186c5f2c27c65103218fc3. This
commit was causing build problems on at least sparc, ppc, and s390,
though I suspect some other targets might be impacted too.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/linux-aarch32-tdesc.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-aarch64-tdesc.cc | 3 | ||||
-rw-r--r-- | gdbserver/linux-arc-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-arm-tdesc.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-csky-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-loongarch-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-riscv-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-tic6x-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-x86-tdesc.cc | 15 | ||||
-rw-r--r-- | gdbserver/netbsd-aarch64-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/netbsd-amd64-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/netbsd-i386-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/tdesc.cc | 5 | ||||
-rw-r--r-- | gdbserver/tdesc.h | 5 | ||||
-rw-r--r-- | gdbserver/win32-i386-low.cc | 4 | ||||
-rw-r--r-- | gdbserver/win32-low.h | 7 |
16 files changed, 18 insertions, 41 deletions
diff --git a/gdbserver/linux-aarch32-tdesc.cc b/gdbserver/linux-aarch32-tdesc.cc index 441fe66..b898775 100644 --- a/gdbserver/linux-aarch32-tdesc.cc +++ b/gdbserver/linux-aarch32-tdesc.cc @@ -34,7 +34,7 @@ aarch32_linux_read_description () tdesc_aarch32 = aarch32_create_target_description (false); static const char *expedite_regs[] = { "r11", "sp", "pc", 0 }; - init_target_desc (tdesc_aarch32, expedite_regs, GDB_OSABI_LINUX); + init_target_desc (tdesc_aarch32, expedite_regs); } return tdesc_aarch32; } diff --git a/gdbserver/linux-aarch64-tdesc.cc b/gdbserver/linux-aarch64-tdesc.cc index 39d5bcc..31ec785 100644 --- a/gdbserver/linux-aarch64-tdesc.cc +++ b/gdbserver/linux-aarch64-tdesc.cc @@ -67,8 +67,7 @@ aarch64_linux_read_description (const aarch64_features &features) expedited_registers.push_back (nullptr); - init_target_desc (tdesc, (const char **) expedited_registers.data (), - GDB_OSABI_LINUX); + init_target_desc (tdesc, (const char **) expedited_registers.data ()); tdesc_aarch64_map[features] = tdesc; } diff --git a/gdbserver/linux-arc-low.cc b/gdbserver/linux-arc-low.cc index 16d8d58..1bcaf6c 100644 --- a/gdbserver/linux-arc-low.cc +++ b/gdbserver/linux-arc-low.cc @@ -114,7 +114,7 @@ arc_linux_read_description (void) target_desc_up tdesc = arc_create_target_description (features); static const char *expedite_regs[] = { "sp", "status32", nullptr }; - init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); + init_target_desc (tdesc.get (), expedite_regs); return tdesc.release (); } diff --git a/gdbserver/linux-arm-tdesc.cc b/gdbserver/linux-arm-tdesc.cc index fff2e94..559f9b0 100644 --- a/gdbserver/linux-arm-tdesc.cc +++ b/gdbserver/linux-arm-tdesc.cc @@ -37,7 +37,7 @@ arm_linux_read_description (arm_fp_type fp_type) tdesc = arm_create_target_description (fp_type, false); static const char *expedite_regs[] = { "r11", "sp", "pc", 0 }; - init_target_desc (tdesc, expedite_regs, GDB_OSABI_LINUX); + init_target_desc (tdesc, expedite_regs); tdesc_arm_list[fp_type] = tdesc; } diff --git a/gdbserver/linux-csky-low.cc b/gdbserver/linux-csky-low.cc index 18a0d15..2eb5a2d 100644 --- a/gdbserver/linux-csky-low.cc +++ b/gdbserver/linux-csky-low.cc @@ -133,7 +133,7 @@ csky_target::low_arch_setup () if (tdesc->expedite_regs.empty ()) { - init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); + init_target_desc (tdesc.get (), expedite_regs); gdb_assert (!tdesc->expedite_regs.empty ()); } diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc index cf7d6c0..584ea64 100644 --- a/gdbserver/linux-loongarch-low.cc +++ b/gdbserver/linux-loongarch-low.cc @@ -85,7 +85,7 @@ loongarch_target::low_arch_setup () if (tdesc->expedite_regs.empty ()) { - init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); + 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 7170ad9..c4554c5 100644 --- a/gdbserver/linux-riscv-low.cc +++ b/gdbserver/linux-riscv-low.cc @@ -91,7 +91,7 @@ riscv_target::low_arch_setup () if (tdesc->expedite_regs.empty ()) { - init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); + init_target_desc (tdesc.get (), expedite_regs); gdb_assert (!tdesc->expedite_regs.empty ()); } diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc index 754dd00..707be2e 100644 --- a/gdbserver/linux-tic6x-low.cc +++ b/gdbserver/linux-tic6x-low.cc @@ -228,7 +228,7 @@ tic6x_read_description (enum c6x_feature feature) { *tdesc = tic6x_create_target_description (feature); static const char *expedite_regs[] = { "A15", "PC", NULL }; - init_target_desc (*tdesc, expedite_regs, GDB_OSABI_LINUX); + init_target_desc (*tdesc, expedite_regs); } return *tdesc; diff --git a/gdbserver/linux-x86-tdesc.cc b/gdbserver/linux-x86-tdesc.cc index 6aa5c4a..13c8076 100644 --- a/gdbserver/linux-x86-tdesc.cc +++ b/gdbserver/linux-x86-tdesc.cc @@ -26,21 +26,10 @@ void x86_linux_post_init_tdesc (target_desc *tdesc, bool is_64bit) { - enum gdb_osabi osabi = GDB_OSABI_LINUX; - -#ifndef IN_PROCESS_AGENT - /* x86 target descriptions are created with the osabi already set. - However, init_target_desc requires us to override the already set - value. That's fine, out new string should match the old one. */ - gdb_assert (tdesc_osabi_name (tdesc) != nullptr); - gdb_assert (strcmp (tdesc_osabi_name (tdesc), - gdbarch_osabi_name (osabi)) == 0); -#endif /* ! IN_PROCESS_AGENT */ - #ifdef __x86_64__ if (is_64bit) - init_target_desc (tdesc, amd64_expedite_regs, osabi); + init_target_desc (tdesc, amd64_expedite_regs); else #endif - init_target_desc (tdesc, i386_expedite_regs, osabi); + init_target_desc (tdesc, i386_expedite_regs); } diff --git a/gdbserver/netbsd-aarch64-low.cc b/gdbserver/netbsd-aarch64-low.cc index 8834e0a..f20a1a7 100644 --- a/gdbserver/netbsd-aarch64-low.cc +++ b/gdbserver/netbsd-aarch64-low.cc @@ -98,7 +98,7 @@ netbsd_aarch64_target::low_arch_setup () = aarch64_create_target_description ({}); static const char *expedite_regs_aarch64[] = { "x29", "sp", "pc", NULL }; - init_target_desc (tdesc, expedite_regs_aarch64, GDB_OSABI_NETBSD); + init_target_desc (tdesc, expedite_regs_aarch64); current_process ()->tdesc = tdesc; } diff --git a/gdbserver/netbsd-amd64-low.cc b/gdbserver/netbsd-amd64-low.cc index ad7cb43..b3f3aab 100644 --- a/gdbserver/netbsd-amd64-low.cc +++ b/gdbserver/netbsd-amd64-low.cc @@ -193,7 +193,7 @@ netbsd_amd64_target::low_arch_setup () target_desc *tdesc = amd64_create_target_description (X86_XSTATE_SSE_MASK, false, false, false); - init_target_desc (tdesc, amd64_expedite_regs, GDB_OSABI_NETBSD); + init_target_desc (tdesc, amd64_expedite_regs); current_process ()->tdesc = tdesc; } diff --git a/gdbserver/netbsd-i386-low.cc b/gdbserver/netbsd-i386-low.cc index ea6fce4..247a397 100644 --- a/gdbserver/netbsd-i386-low.cc +++ b/gdbserver/netbsd-i386-low.cc @@ -142,7 +142,7 @@ netbsd_i386_target::low_arch_setup () target_desc *tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false, false); - init_target_desc (tdesc, i386_expedite_regs, GDB_OSABI_NETBSD); + init_target_desc (tdesc, i386_expedite_regs); current_process ()->tdesc = tdesc; } diff --git a/gdbserver/tdesc.cc b/gdbserver/tdesc.cc index da1287a..d052f43 100644 --- a/gdbserver/tdesc.cc +++ b/gdbserver/tdesc.cc @@ -53,8 +53,7 @@ void target_desc::accept (tdesc_element_visitor &v) const void init_target_desc (struct target_desc *tdesc, - const char **expedite_regs, - enum gdb_osabi osabi) + const char **expedite_regs) { int offset = 0; @@ -89,8 +88,6 @@ init_target_desc (struct target_desc *tdesc, int expedite_count = 0; while (expedite_regs[expedite_count] != nullptr) tdesc->expedite_regs.push_back (expedite_regs[expedite_count++]); - - set_tdesc_osabi (tdesc, osabi); #endif } diff --git a/gdbserver/tdesc.h b/gdbserver/tdesc.h index e6cefe5..4796b50 100644 --- a/gdbserver/tdesc.h +++ b/gdbserver/tdesc.h @@ -81,11 +81,10 @@ void copy_target_description (struct target_desc *dest, const struct target_desc *src); /* Initialize TDESC, and then set its expedite_regs field to - EXPEDITE_REGS and its osabi to OSABI. */ + EXPEDITE_REGS. */ void init_target_desc (struct target_desc *tdesc, - const char **expedite_regs, - enum gdb_osabi osabi); + const char **expedite_regs); /* Return the current inferior's target description. Never returns NULL. */ diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc index 13f9aca..0a761ca 100644 --- a/gdbserver/win32-i386-low.cc +++ b/gdbserver/win32-i386-low.cc @@ -596,12 +596,12 @@ i386_arch_setup (void) #ifdef __x86_64__ tdesc = amd64_create_target_description (X86_XSTATE_SSE_MASK, false, false, false); - init_target_desc (tdesc, amd64_expedite_regs, WINDOWS_OSABI); + init_target_desc (tdesc, amd64_expedite_regs); win32_tdesc = tdesc; #endif tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false, false); - init_target_desc (tdesc, i386_expedite_regs, WINDOWS_OSABI); + init_target_desc (tdesc, i386_expedite_regs); #ifdef __x86_64__ wow64_win32_tdesc = tdesc; #else diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index daed16a..ff997df 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -21,7 +21,6 @@ #include <windows.h> #include "nat/windows-nat.h" -#include "gdbsupport/osabi.h" struct target_desc; @@ -32,12 +31,6 @@ extern const struct target_desc *win32_tdesc; extern const struct target_desc *wow64_win32_tdesc; #endif -#ifdef __CYGWIN__ -constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_CYGWIN; -#else -constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_WINDOWS; -#endif - struct win32_target_ops { /* Architecture-specific setup. */ |