From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25089 invoked by alias); 1 Apr 2003 15:44:11 -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 25077 invoked from network); 1 Apr 2003 15:44:10 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 1 Apr 2003 15:44:10 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h31FiAQ18591 for ; Tue, 1 Apr 2003 10:44:10 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h31Fi9Q22751 for ; Tue, 1 Apr 2003 10:44:09 -0500 Received: from cygbert.vinschen.de (vpn50-16.rdu.redhat.com [172.16.50.16]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h31Fi8514872 for ; Tue, 1 Apr 2003 07:44:08 -0800 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id h31Fi1K13075 for gdb-patches@sources.redhat.com; Tue, 1 Apr 2003 17:44:01 +0200 Date: Tue, 01 Apr 2003 15:44:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] i386-tdep.c: Remove call to inside_entry_file Message-ID: <20030401154401.GA13001@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2003-04/txt/msg00012.txt.bz2 Hi, as suggested by Andrew I'm sending this patch separately. I've checked the patch for i686-pc-linux and i686-pc-cygwin. Linux is unaffected (no change in testsuite results), Cygwin has additional PASSes in asm-source.exp. If the change is unacceptable for some reason, I'd add a new frame_chain function to i386-cygwin-tdep.c. I've added this as an alternative patch. Corinna 2003-04-01 Corinna Vinschen * i386-tdep.c (i386_frame_chain): Remove call to inside_entry_file(). Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.130 diff -u -p -r1.130 i386-tdep.c --- i386-tdep.c 1 Apr 2003 14:38:49 -0000 1.130 +++ i386-tdep.c 1 Apr 2003 15:32:49 -0000 @@ -519,10 +519,7 @@ i386_frame_chain (struct frame_info *fra || 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; + return read_memory_unsigned_integer (get_frame_base (frame), 4); } /* Determine whether the function invocation represented by FRAME does Alternative Cygwin patch: ========================= 2003-04-01 Corinna Vinschen * i386-cygwin-tdep.c (i386_cygwin_frame_chain): New function. (i386_cygwin_init_abi): Set i386_cygwin_frame_chain as new frame_chain function. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.354 diff -u -p -r1.354 Makefile.in --- Makefile.in 30 Mar 2003 14:52:41 -0000 1.354 +++ Makefile.in 1 Apr 2003 15:42:03 -0000 @@ -1791,7 +1791,7 @@ i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ $(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h) i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(gdb_string_h) \ - $(i386_tdep_h) $(osabi_h) + $(i386_tdep_h) $(osabi_h) $(gdbcore_h) $(frame_h) $(dummy_frame_h) i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \ $(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \ $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h) Index: i386-cygwin-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-cygwin-tdep.c,v retrieving revision 1.1 diff -u -p -r1.1 i386-cygwin-tdep.c --- i386-cygwin-tdep.c 21 Mar 2003 10:07:17 -0000 1.1 +++ i386-cygwin-tdep.c 1 Apr 2003 15:42:03 -0000 @@ -20,8 +20,27 @@ Foundation, Inc., 59 Temple Place - Suit #include "defs.h" #include "gdb_string.h" +#include "gdbcore.h" #include "i386-tdep.h" #include "osabi.h" +#include "frame.h" +#include "dummy-frame.h" + +/* 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_cygwin_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) == SIGTRAMP_FRAME + || i386_frameless_signal_p (frame)) + return get_frame_base (frame); + + return read_memory_unsigned_integer (get_frame_base (frame), 4); +} static void i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) @@ -29,6 +48,7 @@ i386_cygwin_init_abi (struct gdbarch_inf struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); tdep->struct_return = reg_struct_return; + set_gdbarch_frame_chain (gdbarch, i386_cygwin_frame_chain); } static enum gdb_osabi -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen@redhat.com