mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
Revert "gdbserver: pass osabi to GDB in target description"
This reverts commit 98bcde5e26
. This
commit was causing build problems on at least sparc, ppc, and s390,
though I suspect some other targets might be impacted too.
This commit is contained in:
parent
d55d7b35c4
commit
a9ed7a0814
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 ());
|
||||
}
|
||||
|
||||
|
@ -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 ();
|
||||
|
@ -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 ());
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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. */
|
||||
|
@ -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
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user