From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29437 invoked by alias); 14 Mar 2003 15:43:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29286 invoked from network); 14 Mar 2003 15:43:13 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 14 Mar 2003 15:43:13 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 8978E59D3E9; Fri, 14 Mar 2003 16:43:12 +0100 (CET) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id h2EFhC414795; Fri, 14 Mar 2003 16:43:12 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3E71F890.7090304@suse.cz> Date: Fri, 14 Mar 2003 15:43:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: GDB Patches Cc: Andrew Cagney , Mark Kettenis Subject: Re: [offbyone RFC] Merge i386newframe References: <3E6FAF64.7070304@suse.cz> In-Reply-To: <3E6FAF64.7070304@suse.cz> Content-Type: multipart/mixed; boundary="------------030708000100080706010108" X-SW-Source: 2003-03/txt/msg00318.txt.bz2 This is a multi-part message in MIME format. --------------030708000100080706010108 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 485 Hi all, I've reworked the merge a little to avoid the need to reorder frame.c:get_prev_frame() and fixed the 'next' and 'return' bugs that were in the prevoius one. Now it passes the testsuite even better than the i386newframe code did :-) I'm sorry I'm short of time to write more now. Andrew and Mark, please look around the patch and tell me your opinions. Have a nice weekend, Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz --------------030708000100080706010108 Content-Type: text/plain; name="merge-i386-3.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="merge-i386-3.diff" Content-length: 20843 Index: i386-tdep.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.117 diff -u -p -r1.117 i386-tdep.c --- i386-tdep.c 12 Mar 2003 16:50:44 -0000 1.117 +++ i386-tdep.c 14 Mar 2003 15:37:22 -0000 @@ -40,6 +40,7 @@ #include "reggroups.h" #include "dummy-frame.h" #include "osabi.h" +#include "frame-unwind.h" =20 #include "i386-tdep.h" #include "i387-tdep.h" @@ -469,64 +470,8 @@ i386_get_frame_setup (CORE_ADDR pc) return (-1); } =20 -/* Signal trampolines don't have a meaningful frame. The frame - pointer value we use is actually the frame pointer of the calling - 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 - testing for get_frame_type() =3D=3D 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 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 - has been set up. Incidentally, that's just what happens when we - call a function from GDB with a signal pending (there's a test in - the testsuite that makes this happen). Therefore we pretend that - we have a frameless function if we're stopped at the start of a - function. */ - -/* Return non-zero if we're dealing with a frameless signal, that is, - a signal trampoline invoked from a frameless function. */ - -int -i386_frameless_signal_p (struct frame_info *frame) -{ - return (get_next_frame (frame) - && get_frame_type (get_next_frame (frame)) =3D=3D SIGTRAMP_FRAME - && (frameless_look_for_prologue (frame) - || get_frame_pc (frame) =3D=3D get_pc_function_start (get_frame_pc = (frame)))); -} - -/* Return the chain-pointer for FRAME. In the case of the i386, the - frame's nominal address is the address of a 4-byte word containing - the calling frame's address. */ - -static CORE_ADDR -i386_frame_chain (struct frame_info *frame) -{ - if (pc_in_dummy_frame (get_frame_pc (frame))) - return get_frame_base (frame); - - if (get_frame_type (frame) =3D=3D SIGTRAMP_FRAME - || i386_frameless_signal_p (frame)) - return get_frame_base (frame); - - if (! inside_entry_file (get_frame_pc (frame))) - return read_memory_unsigned_integer (get_frame_base (frame), 4); - - return 0; -} - /* Determine whether the function invocation represented by FRAME does - not have a from on the stack associated with it. If it does not, + not have a frame on the stack associated with it. If it does not, return non-zero, otherwise return zero. */ =20 static int @@ -538,66 +483,16 @@ i386_frameless_function_invocation (stru return frameless_look_for_prologue (frame); } =20 -/* Assuming FRAME is for a sigtramp routine, return the saved program - counter. */ - -static CORE_ADDR -i386_sigtramp_saved_pc (struct frame_info *frame) -{ - struct gdbarch_tdep *tdep =3D gdbarch_tdep (current_gdbarch); - CORE_ADDR addr; - - addr =3D tdep->sigcontext_addr (frame); - return read_memory_unsigned_integer (addr + tdep->sc_pc_offset, 4); -} - -/* Assuming FRAME is for a sigtramp routine, return the saved stack - pointer. */ - -static CORE_ADDR -i386_sigtramp_saved_sp (struct frame_info *frame) -{ - struct gdbarch_tdep *tdep =3D gdbarch_tdep (current_gdbarch); - CORE_ADDR addr; - - addr =3D tdep->sigcontext_addr (frame); - return read_memory_unsigned_integer (addr + tdep->sc_sp_offset, 4); -} - -/* Return the saved program counter for FRAME. */ - -static CORE_ADDR -i386_frame_saved_pc (struct frame_info *frame) -{ - if (pc_in_dummy_frame (get_frame_pc (frame))) - { - ULONGEST pc; - - frame_unwind_unsigned_register (frame, PC_REGNUM, &pc); - return pc; - } - - if (get_frame_type (frame) =3D=3D SIGTRAMP_FRAME) - return i386_sigtramp_saved_pc (frame); - - if (i386_frameless_signal_p (frame)) - { - CORE_ADDR sp =3D i386_sigtramp_saved_sp (get_next_frame (frame)); - return read_memory_unsigned_integer (sp, 4); - } - - return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4); -} - /* Immediately after a function call, return the saved pc. */ =20 static CORE_ADDR i386_saved_pc_after_call (struct frame_info *frame) { - if (get_frame_type (frame) =3D=3D SIGTRAMP_FRAME) - return i386_sigtramp_saved_pc (frame); + char buf[4]; =20 - return read_memory_unsigned_integer (read_register (SP_REGNUM), 4); + /* Our frame unwinder handles this just fine. */ + frame_unwind_register (frame, PC_REGNUM, buf); + return extract_address (buf, 4); } =20 /* Return number of args passed to a frame. @@ -674,72 +569,6 @@ i386_frame_num_args (struct frame_info * #endif } =20 -/* Parse the first few instructions the function to see what registers - were stored. -=20=20=20 - We handle these cases: - - The startup sequence can be at the start of the function, or the - function can start with a branch to startup code at the end. - - %ebp can be set up with either the 'enter' instruction, or "pushl - %ebp, movl %esp, %ebp" (`enter' is too slow to be useful, but was - once used in the System V compiler). - - Local space is allocated just below the saved %ebp by either the - 'enter' instruction, or by "subl $, %esp". 'enter' has a 16 - bit unsigned argument for space to allocate, and the 'addl' - instruction could have either a signed byte, or 32 bit immediate. - - Next, the registers used by this function are pushed. With the - System V compiler they will always be in the order: %edi, %esi, - %ebx (and sometimes a harmless bug causes it to also save but not - restore %eax); however, the code below is willing to see the pushes - in any order, and will handle up to 8 of them. -=20 - If the setup sequence is at the end of the function, then the next - instruction will be a branch back to the start. */ - -static void -i386_frame_init_saved_regs (struct frame_info *fip) -{ - long locals =3D -1; - unsigned char op; - CORE_ADDR addr; - CORE_ADDR pc; - int i; - - if (get_frame_saved_regs (fip)) - return; - - frame_saved_regs_zalloc (fip); - - pc =3D get_pc_function_start (get_frame_pc (fip)); - if (pc !=3D 0) - locals =3D i386_get_frame_setup (pc); - - if (locals >=3D 0) - { - addr =3D get_frame_base (fip) - 4 - locals; - for (i =3D 0; i < 8; i++) - { - op =3D codestream_get (); - if (op < 0x50 || op > 0x57) - break; -#ifdef I386_REGNO_TO_SYMMETRY - /* Dynix uses different internal numbering. Ick. */ - get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] =3D addr; -#else - get_frame_saved_regs (fip)[op - 0x50] =3D addr; -#endif - addr -=3D 4; - } - } - - get_frame_saved_regs (fip)[PC_REGNUM] =3D get_frame_base (fip) + 4; - get_frame_saved_regs (fip)[FP_REGNUM] =3D get_frame_base (fip); -} - /* Return PC of first real instruction. */ =20 static CORE_ADDR @@ -855,37 +684,323 @@ i386_push_return_address (CORE_ADDR pc,=20 write_memory (sp - 4, buf, 4); return sp - 4; } +=0C +#define regcache_cooked_write_unsigned regcache_raw_write_unsigned =20 -static void -i386_do_pop_frame (struct frame_info *frame) +#ifdef I386_REGNO_TO_SYMMETRY +#error "The Sequent Symmetry is no longer supported." +#endif + +/* According to the System V ABI, the registers %ebp, %ebx, %edi, %esi + and %esp "belong" to the calling function. */ + +/* The maximum number of saved registers. This should include all + registers mentioned above, and %eip. */ +#define I386_NUM_SAVED_REGISTERS 9 + +struct i386_frame_cache +{ + CORE_ADDR saved_regs[I386_NUM_SAVED_REGISTERS]; + CORE_ADDR saved_sp; + CORE_ADDR return_pc; + CORE_ADDR base; + int frameless; +}; + +/* Parse the first few instructions the function to see what registers + were stored. +=20=20=20 + We handle these cases: + + The startup sequence can be at the start of the function, or the + function can start with a branch to startup code at the end. + + %ebp can be set up with either the 'enter' instruction, or "pushl + %ebp, movl %esp, %ebp" (`enter' is too slow to be useful, but was + once used in the System V compiler). + + Local space is allocated just below the saved %ebp by either the + 'enter' instruction, or by "subl $, %esp". 'enter' has a 16 + bit unsigned argument for space to allocate, and the 'addl' + instruction could have either a signed byte, or 32 bit immediate. + + Next, the registers used by this function are pushed. With the + System V compiler they will always be in the order: %edi, %esi, + %ebx (and sometimes a harmless bug causes it to also save but not + restore %eax); however, the code below is willing to see the pushes + in any order, and will handle up to 8 of them. +=20 + If the setup sequence is at the end of the function, then the next + instruction will be a branch back to the start. */ + +static struct i386_frame_cache * +i386_frame_cache (struct frame_info *frame, void **cachep) { - CORE_ADDR fp; - int regnum; - char regbuf[I386_MAX_REGISTER_SIZE]; + struct i386_frame_cache *cache; + CORE_ADDR pc, start_pc; + + if (*cachep) + return *cachep; + + cache =3D FRAME_OBSTACK_ZALLOC (struct i386_frame_cache); + + pc =3D frame_pc_unwind (frame); + start_pc =3D get_pc_function_start (pc); =20 - fp =3D get_frame_base (frame); - i386_frame_init_saved_regs (frame); + long locals =3D -1; + + if (start_pc !=3D 0) + locals =3D i386_get_frame_setup (start_pc); =20 - for (regnum =3D 0; regnum < NUM_REGS; regnum++) + if (locals >=3D 0 && pc > start_pc) { + ULONGEST fp; CORE_ADDR addr; - addr =3D get_frame_saved_regs (frame)[regnum]; - if (addr) + unsigned char op; + int i; + + frame_unwind_unsigned_register (frame, FP_REGNUM, &fp); + cache->base =3D fp; + + addr =3D fp - 4 - locals; + for (i =3D 0; i < I386_NUM_SAVED_REGISTERS; i++) + { + op =3D codestream_get (); + if (op < 0x50 || op > 0x57) + break; + + cache->saved_regs[op - 0x50] =3D addr; + addr -=3D 4; + } + + cache->saved_regs[PC_REGNUM] =3D fp + 4; + cache->saved_regs[FP_REGNUM] =3D fp; + cache->saved_sp =3D fp + 8; + } + else + { + ULONGEST sp; +=20=20=20=20 + /* This function is either frameless or we're at the start + of the function and this function's frame hasn't been + setup yet. In the latter case only %eip and %esp have + changed, and we can determine their previous values. We + pretend we can do the same in the former case. */ + cache->frameless =3D 1; +=20=20=20=20 + frame_unwind_unsigned_register (frame, SP_REGNUM, &sp); + cache->saved_regs[PC_REGNUM] =3D sp; + cache->saved_sp =3D cache->saved_regs[PC_REGNUM] + 4; + cache->base =3D sp; + } + + *cachep =3D cache; + return cache; +} + +static CORE_ADDR +i386_frame_pc_unwind (struct frame_info *frame, void **cachep) +{ + struct i386_frame_cache *cache =3D i386_frame_cache (frame, cachep); + + if (cache->return_pc =3D=3D 0) + { + char buf[4]; + + frame_unwind_register (frame, PC_REGNUM, buf); + cache->return_pc =3D extract_address (buf, 4); + } + + return cache->return_pc; +} + +static CORE_ADDR +i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +{ + ULONGEST pc; + frame_unwind_unsigned_register (next_frame, PC_REGNUM, &pc); + return (CORE_ADDR) pc; +} + +static void +i386_frame_this_id (struct frame_info *next_frame, + void **cachep, + struct frame_id *this_id) +{ + CORE_ADDR pc; + ULONGEST base; + + gdb_assert (this_id !=3D NULL); + + *this_id =3D null_frame_id; +=20=20 + pc =3D frame_pc_unwind (next_frame); +=20=20 + frame_unwind_unsigned_register (next_frame, FP_REGNUM, &base); + + if (frame_relative_level (next_frame) >=3D 0 + && get_frame_type (next_frame) !=3D DUMMY_FRAME + && get_frame_id (next_frame).pc =3D=3D pc + && get_frame_id (next_frame).base =3D=3D base) + return; + + this_id->pc =3D pc; + this_id->base =3D base; +} + +static void +i386_frame_register_unwind (struct frame_info *frame, void **cachep, + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *valuep) +{ + /* FIXME: kettenis/20030302: I don't understand why the cache isn't + already initialized. */ + struct i386_frame_cache *cache =3D i386_frame_cache (frame, cachep); + + gdb_assert (cache); + gdb_assert (regnum >=3D 0); + + if (regnum =3D=3D PC_REGNUM) + { + CORE_ADDR pc; + *optimizedp =3D 0; + *lvalp =3D not_lval; + *addrp =3D 0; + *realnump =3D -1; + pc =3D i386_frame_pc_unwind (frame, cachep); + if (valuep) + store_address (valuep, 4, pc); + } + + if (regnum < I386_NUM_SAVED_REGISTERS && cache->saved_regs[regnum] !=3D = 0) + { + *optimizedp =3D 0; + *lvalp =3D lval_memory; + *addrp =3D cache->saved_regs[regnum]; + *realnump =3D -1; + if (valuep) { - read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum)); - deprecated_write_register_gen (regnum, regbuf); + /* Read the value in from memory. */ + read_memory (*addrp, valuep, + register_size (current_gdbarch, regnum)); } + return; } - write_register (FP_REGNUM, read_memory_integer (fp, 4)); - write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); - write_register (SP_REGNUM, fp + 8); - flush_cached_frames (); + + frame_register (frame, regnum, optimizedp, lvalp, addrp, realnump, value= p); +} + +static struct i386_frame_cache * +i386_sigtramp_cache (struct frame_info *frame, void **cachep) +{ + struct i386_frame_cache *cache; + CORE_ADDR pc, start_pc, addr; + struct gdbarch_tdep *tdep =3D gdbarch_tdep (current_gdbarch); + int sc_offset, regnum; + + if (*cachep) + return *cachep; + + cache =3D FRAME_OBSTACK_ZALLOC (struct i386_frame_cache); + + pc =3D frame_pc_unwind (frame); + start_pc =3D get_pc_function_start (pc); + addr =3D tdep->sigcontext_addr (frame->prev); + + for (regnum=3D0; regnum<=3DPS_REGNUM; regnum++) + { + /* See for details on how registers are stored=20 + in the sigcontext. */ + if (regnum < PC_REGNUM) + sc_offset =3D (11 - regnum); + else if (regnum =3D=3D PC_REGNUM) + sc_offset =3D 14; + else if (regnum =3D=3D PS_REGNUM) + sc_offset =3D 16; + else + break; + + sc_offset *=3D 4; + + if (regnum < sizeof (cache->saved_regs)) + cache->saved_regs[regnum] =3D addr + sc_offset; + } + + cache->base =3D addr; + + *cachep =3D cache; + return cache; } =20 static void -i386_pop_frame (void) +i386_sigtramp_register_unwind (struct frame_info *frame, void **cachep, + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *valuep) +{ + struct i386_frame_cache *cache =3D i386_sigtramp_cache (frame, cachep); + + gdb_assert (cache); + gdb_assert (regnum >=3D 0); + + if (regnum < I386_NUM_SAVED_REGISTERS && cache->saved_regs[regnum] !=3D = 0) + { + *optimizedp =3D 0; + *lvalp =3D lval_memory; + *addrp =3D cache->saved_regs[regnum]; + *realnump =3D -1; + if (valuep) + read_memory (*addrp, valuep, + register_size (current_gdbarch, regnum)); + return; + } +=20=20 + /* Fall back for non-saved registers. */ + frame_register (frame, regnum, optimizedp, lvalp, addrp, realnump, value= p); +} + +static struct frame_unwind i386_sigtramp_unwind =3D { + i386_frame_this_id, + i386_sigtramp_register_unwind +}; + +static struct frame_unwind i386_frame_unwind =3D { + i386_frame_this_id, + i386_frame_register_unwind +}; + +const struct frame_unwind * +i386_frame_p (CORE_ADDR pc) +{ + if (gdbarch_pc_in_sigtramp (current_gdbarch, pc, NULL)) + return &i386_sigtramp_unwind; + else + return &i386_frame_unwind; +} + +static struct frame_id +i386_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_fra= me) +{ + struct frame_id id; + ULONGEST base; + + id.pc =3D frame_pc_unwind (next_frame); + frame_unwind_unsigned_register (next_frame, FP_REGNUM, &base); + id.base =3D base; + return id; +} + +static void +i386_save_dummy_frame_tos (CORE_ADDR sp) { - generic_pop_current_frame (i386_do_pop_frame); + /* We can't use the saved top-of-stack to find the right dummy frame + when unwinding, since we can't reconstruct it properly if the + dummy frame is the innermost frame. To circumvent this, we fake + a frame pointer here. */ + + regcache_cooked_write_unsigned (current_regcache, FP_REGNUM, sp); + generic_save_dummy_frame_tos (sp); } =0C =20 @@ -1312,7 +1427,13 @@ i386_pe_skip_trampoline_code (CORE_ADDR=20 static int i386_pc_in_sigtramp (CORE_ADDR pc, char *name) { - return (name && strcmp ("_sigtramp", name) =3D=3D 0); + char *pname; + if (name) + pname =3D name; + else + find_pc_partial_function (pc, &pname, NULL, NULL); + + return (name && strcmp ("_sigtramp", pname) =3D=3D 0); } =0C =20 @@ -1506,10 +1627,6 @@ i386_gdbarch_init (struct gdbarch_info i tdep =3D XMALLOC (struct gdbarch_tdep); gdbarch =3D gdbarch_alloc (&info, tdep); =20 - /* 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 now, which probably is not quite right. */ @@ -1591,14 +1708,12 @@ i386_gdbarch_init (struct gdbarch_info i set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value); set_gdbarch_push_arguments (gdbarch, i386_push_arguments); 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_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); =20 - set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, i386_frame_init_s= aved_regs); set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue); =20 /* Stack grows downward. */ @@ -1608,16 +1723,9 @@ i386_gdbarch_init (struct gdbarch_info i set_gdbarch_decr_pc_after_break (gdbarch, 1); set_gdbarch_function_start_offset (gdbarch, 0); =20 - /* The following redefines make backtracing through sigtramp work. - They manufacture a fake sigtramp frame and obtain the saved pc in - sigtramp from the sigcontext structure which is pushed by the - kernel on the user stack, along with a pointer to it. */ - set_gdbarch_frame_args_skip (gdbarch, 8); set_gdbarch_frameless_function_invocation (gdbarch, i386_frameless_function_invocat= ion); - set_gdbarch_frame_chain (gdbarch, i386_frame_chain); - set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_frame_saved_pc); set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call); set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args); set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp); @@ -1629,12 +1737,19 @@ i386_gdbarch_init (struct gdbarch_info i =20 set_gdbarch_print_insn (gdbarch, i386_print_insn); =20 + set_gdbarch_unwind_dummy_id (gdbarch, i386_unwind_dummy_id); + set_gdbarch_save_dummy_frame_tos (gdbarch, i386_save_dummy_frame_tos); + + set_gdbarch_unwind_pc (gdbarch, i386_unwind_pc); + /* Add the i386 register groups. */ i386_add_reggroups (gdbarch); set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p); =20 /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); + + frame_unwind_append_predicate (gdbarch, i386_frame_p); =20 return gdbarch; } --------------030708000100080706010108--