/* Intel 386 target-dependent stuff.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
#include "value.h"
#include "gdb_assert.h"
#include "reggroups.h"
+#include "dummy-frame.h"
+#include "osabi.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
/* Names of the registers. The first 10 registers match the register
numbering scheme used by GCC for stabs and DWARF. */
+
static char *i386_register_names[] =
{
"eax", "ecx", "edx", "ebx",
"mxcsr"
};
+static const int i386_num_register_names =
+ (sizeof (i386_register_names) / sizeof (*i386_register_names));
+
/* MMX registers. */
static char *i386_mmx_names[] =
"mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7"
};
-static const int mmx_num_regs = (sizeof (i386_mmx_names)
- / sizeof (i386_mmx_names[0]));
-#define MM0_REGNUM (NUM_REGS)
+
+static const int i386_num_mmx_regs =
+ (sizeof (i386_mmx_names) / sizeof (i386_mmx_names[0]));
+
+#define MM0_REGNUM NUM_REGS
static int
-i386_mmx_regnum_p (int reg)
+i386_mmx_regnum_p (int regnum)
{
- return (reg >= MM0_REGNUM && reg < MM0_REGNUM + mmx_num_regs);
+ return (regnum >= MM0_REGNUM
+ && regnum < MM0_REGNUM + i386_num_mmx_regs);
}
/* FP register? */
i386_fp_regnum_p (int regnum)
{
return (regnum < NUM_REGS
- && (FP0_REGNUM && FP0_REGNUM <= (regnum) && (regnum) < FPC_REGNUM));
+ && (FP0_REGNUM && FP0_REGNUM <= regnum && regnum < FPC_REGNUM));
}
int
i386_fpc_regnum_p (int regnum)
{
return (regnum < NUM_REGS
- && (FPC_REGNUM <= (regnum) && (regnum) < XMM0_REGNUM));
+ && (FPC_REGNUM <= regnum && regnum < XMM0_REGNUM));
}
/* SSE register? */
i386_sse_regnum_p (int regnum)
{
return (regnum < NUM_REGS
- && (XMM0_REGNUM <= (regnum) && (regnum) < MXCSR_REGNUM));
+ && (XMM0_REGNUM <= regnum && regnum < MXCSR_REGNUM));
}
int
i386_mxcsr_regnum_p (int regnum)
{
return (regnum < NUM_REGS
- && (regnum == MXCSR_REGNUM));
+ && regnum == MXCSR_REGNUM);
}
/* Return the name of register REG. */
const char *
i386_register_name (int reg)
{
- if (reg < 0)
- return NULL;
+ if (reg >= 0 && reg < i386_num_register_names)
+ return i386_register_names[reg];
+
if (i386_mmx_regnum_p (reg))
return i386_mmx_names[reg - MM0_REGNUM];
- if (reg >= sizeof (i386_register_names) / sizeof (*i386_register_names))
- return NULL;
- return i386_register_names[reg];
+ return NULL;
}
/* Convert stabs register number REG to the appropriate register
frame -- that is, the frame which was in progress when the signal
trampoline was entered. GDB mostly treats this frame pointer value
as a magic cookie. We detect the case of a signal trampoline by
- looking at the SIGNAL_HANDLER_CALLER field, which is set based on
- PC_IN_SIGTRAMP.
+ testing for get_frame_type() == SIGTRAMP_FRAME, which is set based
+ on PC_IN_SIGTRAMP.
When a signal trampoline is invoked from a frameless function, we
essentially have two frameless functions in a row. In this case,
we use the same magic cookie for three frames in a row. We detect
- this case by seeing whether the next frame has
- SIGNAL_HANDLER_CALLER set, and, if it does, checking whether the
- current frame is actually frameless. In this case, we need to get
- the PC by looking at the SP register value stored in the signal
- context.
+ this case by seeing whether the next frame is a SIGTRAMP_FRAME,
+ and, if it does, checking whether the current frame is actually
+ frameless. In this case, we need to get the PC by looking at the
+ SP register value stored in the signal context.
This should work in most cases except in horrible situations where
a signal occurs just as we enter a function but before the frame
int
i386_frameless_signal_p (struct frame_info *frame)
{
- return (frame->next && frame->next->signal_handler_caller
+ return (get_next_frame (frame)
+ && get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
&& (frameless_look_for_prologue (frame)
- || frame->pc == get_pc_function_start (frame->pc)));
+ || get_frame_pc (frame) == get_frame_func (frame)));
}
/* Return the chain-pointer for FRAME. In the case of the i386, the
static CORE_ADDR
i386_frame_chain (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
- return frame->frame;
+ if (pc_in_dummy_frame (get_frame_pc (frame)))
+ return get_frame_base (frame);
- if (frame->signal_handler_caller
+ if (get_frame_type (frame) == SIGTRAMP_FRAME
|| i386_frameless_signal_p (frame))
- return frame->frame;
+ return get_frame_base (frame);
- if (! inside_entry_file (frame->pc))
- return read_memory_unsigned_integer (frame->frame, 4);
+ if (! inside_entry_file (get_frame_pc (frame)))
+ return read_memory_unsigned_integer (get_frame_base (frame), 4);
return 0;
}
static int
i386_frameless_function_invocation (struct frame_info *frame)
{
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return 0;
return frameless_look_for_prologue (frame);
static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
- if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ if (pc_in_dummy_frame (get_frame_pc (frame)))
{
ULONGEST pc;
return pc;
}
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return i386_sigtramp_saved_pc (frame);
if (i386_frameless_signal_p (frame))
{
- CORE_ADDR sp = i386_sigtramp_saved_sp (frame->next);
+ CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
return read_memory_unsigned_integer (sp, 4);
}
- return read_memory_unsigned_integer (frame->frame + 4, 4);
+ return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
}
/* Immediately after a function call, return the saved pc. */
static CORE_ADDR
i386_saved_pc_after_call (struct frame_info *frame)
{
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return i386_sigtramp_saved_pc (frame);
return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
}
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-static int
-i386_frame_num_args (struct frame_info *fi)
-{
-#if 1
- return -1;
-#else
- /* This loses because not only might the compiler not be popping the
- args right after the function call, it might be popping args from
- both this call and a previous one, and we would say there are
- more args than there really are. */
-
- int retpc;
- unsigned char op;
- struct frame_info *pfi;
-
- /* On the i386, the instruction following the call could be:
- popl %ecx - one arg
- addl $imm, %esp - imm/4 args; imm may be 8 or 32 bits
- anything else - zero args. */
-
- int frameless;
-
- frameless = FRAMELESS_FUNCTION_INVOCATION (fi);
- if (frameless)
- /* In the absence of a frame pointer, GDB doesn't get correct
- values for nameless arguments. Return -1, so it doesn't print
- any nameless arguments. */
- return -1;
-
- pfi = get_prev_frame (fi);
- if (pfi == 0)
- {
- /* NOTE: This can happen if we are looking at the frame for
- main, because FRAME_CHAIN_VALID won't let us go into start.
- If we have debugging symbols, that's not really a big deal;
- it just means it will only show as many arguments to main as
- are declared. */
- return -1;
- }
- else
- {
- retpc = pfi->pc;
- op = read_memory_integer (retpc, 1);
- if (op == 0x59) /* pop %ecx */
- return 1;
- else if (op == 0x83)
- {
- op = read_memory_integer (retpc + 1, 1);
- if (op == 0xc4)
- /* addl $<signed imm 8 bits>, %esp */
- return (read_memory_integer (retpc + 2, 1) & 0xff) / 4;
- else
- return 0;
- }
- else if (op == 0x81) /* `add' with 32 bit immediate. */
- {
- op = read_memory_integer (retpc + 1, 1);
- if (op == 0xc4)
- /* addl $<imm 32>, %esp */
- return read_memory_integer (retpc + 2, 4) / 4;
- else
- return 0;
- }
- else
- {
- return 0;
- }
- }
-#endif
-}
-
/* Parse the first few instructions the function to see what registers
were stored.
CORE_ADDR pc;
int i;
- if (fip->saved_regs)
+ if (get_frame_saved_regs (fip))
return;
frame_saved_regs_zalloc (fip);
- pc = get_pc_function_start (fip->pc);
+ pc = get_frame_func (fip);
if (pc != 0)
locals = i386_get_frame_setup (pc);
if (locals >= 0)
{
- addr = fip->frame - 4 - locals;
+ addr = get_frame_base (fip) - 4 - locals;
for (i = 0; i < 8; i++)
{
op = codestream_get ();
break;
#ifdef I386_REGNO_TO_SYMMETRY
/* Dynix uses different internal numbering. Ick. */
- fip->saved_regs[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
+ get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
#else
- fip->saved_regs[op - 0x50] = addr;
+ get_frame_saved_regs (fip)[op - 0x50] = addr;
#endif
addr -= 4;
}
}
- fip->saved_regs[PC_REGNUM] = fip->frame + 4;
- fip->saved_regs[FP_REGNUM] = fip->frame;
+ get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4;
+ get_frame_saved_regs (fip)[FP_REGNUM] = get_frame_base (fip);
}
/* Return PC of first real instruction. */
int regnum;
char regbuf[I386_MAX_REGISTER_SIZE];
- fp = FRAME_FP (frame);
+ fp = get_frame_base (frame);
i386_frame_init_saved_regs (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
CORE_ADDR addr;
- addr = frame->saved_regs[regnum];
+ addr = get_frame_saved_regs (frame)[regnum];
if (addr)
{
read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
/* Figure out where the longjmp will land. Slurp the args out of the
stack. We expect the first arg to be a pointer to the jmp_buf
structure from which we extract the address that we will land at.
- This address is copied into PC. This routine returns true on
+ This address is copied into PC. This routine returns non-zero on
success. */
static int
i386_get_longjmp_target (CORE_ADDR *pc)
{
- char buf[4];
+ char buf[8];
CORE_ADDR sp, jb_addr;
int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
+ int len = TYPE_LENGTH (builtin_type_void_func_ptr);
/* If JB_PC_OFFSET is -1, we have no way to find out where the
longjmp will land. */
return 0;
sp = read_register (SP_REGNUM);
- if (target_read_memory (sp + 4, buf, 4))
+ if (target_read_memory (sp + len, buf, len))
return 0;
- jb_addr = extract_address (buf, 4);
- if (target_read_memory (jb_addr + jb_pc_offset, buf, 4))
+ jb_addr = extract_typed_address (buf, builtin_type_void_func_ptr);
+ if (target_read_memory (jb_addr + jb_pc_offset, buf, len))
return 0;
- *pc = extract_address (buf, 4);
+ *pc = extract_typed_address (buf, builtin_type_void_func_ptr);
return 1;
}
\f
i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- sp = default_push_arguments (nargs, args, sp, struct_return, struct_addr);
+ sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
if (struct_return)
{
return sp;
}
-static void
-i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* Do nothing. Everything was already done by i386_push_arguments. */
-}
-
/* These registers are used for returning integers (and on some
targets also for returning `struct' and `union' values when their
size and alignment match an integer type). */
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- if (FP0_REGNUM == 0)
+ if (FP0_REGNUM < 0)
{
warning ("Cannot find floating-point return value.");
memset (valbuf, 0, len);
ULONGEST fstat;
char buf[FPU_REG_RAW_SIZE];
- if (FP0_REGNUM == 0)
+ if (FP0_REGNUM < 0)
{
warning ("Cannot set floating-point return value.");
return;
potentially they could be used for things other than address. */
static struct type *
-i386_register_virtual_type (int regnum)
+i386_register_type (struct gdbarch *gdbarch, int regnum)
{
if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
return lookup_pointer_type (builtin_type_void);
}
/* Map a cooked register onto a raw register or memory. For the i386,
- the MMX registers need to be mapped onto floating point registers. */
+ the MMX registers need to be mapped onto floating-point registers. */
static int
-mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
+i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
{
int mmxi;
ULONGEST fstat;
int tos;
int fpi;
+
mmxi = regnum - MM0_REGNUM;
regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
tos = (fstat >> 11) & 0x7;
fpi = (mmxi + tos) % 8;
+
return (FP0_REGNUM + fpi);
}
if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
- int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
- regcache_raw_read (regcache, fpnum, mmx_buf);
+ int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
+
/* Extract (always little endian). */
+ regcache_raw_read (regcache, fpnum, mmx_buf);
memcpy (buf, mmx_buf, REGISTER_RAW_SIZE (regnum));
}
else
if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
- int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
+ int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
+
/* Read ... */
regcache_raw_read (regcache, fpnum, mmx_buf);
/* ... Modify ... (always little endian). */
unsigned long indirect = read_memory_unsigned_integer (pc + 2, 4);
struct minimal_symbol *indsym =
indirect ? lookup_minimal_symbol_by_pc (indirect) : 0;
- char *symname = indsym ? SYMBOL_NAME (indsym) : 0;
+ char *symname = indsym ? SYMBOL_LINKAGE_NAME (indsym) : 0;
if (symname)
{
int sigcontext_offset = -1;
char *name = NULL;
- find_pc_partial_function (frame->pc, &name, NULL, NULL);
+ find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL);
if (name)
{
if (strcmp (name, "_sigreturn") == 0)
gdb_assert (sigcontext_offset != -1);
- if (frame->next)
- return frame->next->frame + sigcontext_offset;
+ if (get_next_frame (frame))
+ return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
return read_register (SP_REGNUM) + sigcontext_offset;
}
\f
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
tdep->sc_pc_offset = 14 * 4;
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* FIXME: kettenis/20020511: Why do we override this function here? */
- set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
-
tdep->jb_pc_offset = 24;
}
\f
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
-
- /* Try to determine the OS ABI of the object we're loading. */
- if (info.abfd != NULL)
- osabi = gdbarch_lookup_osabi (info.abfd);
- /* Find a candidate among extant architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- /* Make sure the OS ABI selection matches. */
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->osabi == osabi)
- return arches->gdbarch;
- }
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
/* Allocate space for the new architecture. */
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- tdep->osabi = osabi;
+ /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
+ ready to unwind the PC first (see frame.c:get_prev_frame()). */
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
/* The i386 default settings don't include the SSE registers.
FIXME: kettenis/20020614: They do include the FPU registers for
set_gdbarch_register_name (gdbarch, i386_register_name);
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
- set_gdbarch_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, i386_register_type);
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
- set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
-
/* Call dummy code. */
- set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, NULL);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
i386_register_convert_to_virtual);
set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
- set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
-
- set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
-
/* "An argument's size is increased, if necessary, to make it a
multiple of [32-bit] words. This may require tail padding,
depending on the size of the argument" -- from the x86 ABI. */
set_gdbarch_parm_boundary (gdbarch, 32);
set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
- set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
- set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
- set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+ set_gdbarch_deprecated_push_arguments (gdbarch, i386_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, i386_push_return_address);
+ set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
- set_gdbarch_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
+ set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
/* Stack grows downward. */
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_frameless_function_invocation (gdbarch,
i386_frameless_function_invocation);
- set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
- set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, default_frame_address);
- set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
- set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
+ set_gdbarch_deprecated_frame_chain (gdbarch, i386_frame_chain);
+ set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_frame_saved_pc);
+ set_gdbarch_deprecated_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
+ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
/* Wire in the MMX registers. */
- set_gdbarch_num_pseudo_regs (gdbarch, mmx_num_regs);
+ set_gdbarch_num_pseudo_regs (gdbarch, i386_num_mmx_regs);
set_gdbarch_pseudo_register_read (gdbarch, i386_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write);
i386_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
/* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch, osabi);
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_nlm_flavour,
i386_nlm_osabi_sniffer);
- gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_SVR4,
+ gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4,
i386_svr4_init_abi);
- gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_GO32,
+ gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_GO32,
i386_go32_init_abi);
- gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETWARE,
+ gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETWARE,
i386_nw_init_abi);
/* Initialize the i386 specific register groups. */