From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13269 invoked by alias); 24 Mar 2004 23:03:12 -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 13226 invoked from network); 24 Mar 2004 23:03:10 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 24 Mar 2004 23:03:10 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2ON33QE000292; Thu, 25 Mar 2004 00:03:03 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2ON33K2005976; Thu, 25 Mar 2004 00:03:03 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i2ON33uL005973; Thu, 25 Mar 2004 00:03:03 +0100 (CET) Date: Wed, 24 Mar 2004 23:03:00 -0000 Message-Id: <200403242303.i2ON33uL005973@elgar.kettenis.dyndns.org> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com Subject: Signal Trampoline Frames X-SW-Source: 2004-03/txt/msg00578.txt.bz2 Andrew, It's probably too late now, but I have the feeling this new tramp-frame.c is not generic enough. It assumes fixed-length instructions (which makes it unsuitable for IA-32 and AMD64) and uses the arbitrary number 8 for the number of instructions (which makes it not quite suitable for SPARC). The whole thing seems a bit over-engineered to me :-(. Anyway, you might want to conseider the attached patch, which makes the comments catch up with reality. The extra whitespace is there to guide the eye and make the distinction between the instruction sequence members and the initialization function clear. Mark Index: ChangeLog from Mark Kettenis * tramp-frame.h (struct tramp_frame): Fix comments. Index: tramp-frame.h =================================================================== RCS file: /cvs/src/src/gdb/tramp-frame.h,v retrieving revision 1.2 diff -u -p -r1.2 tramp-frame.h --- tramp-frame.h 23 Mar 2004 14:12:30 -0000 1.2 +++ tramp-frame.h 24 Mar 2004 22:51:03 -0000 @@ -43,15 +43,16 @@ struct tramp_frame { /* The trampoline's entire instruction sequence. Search for this in the inferior at or around the frame's PC. It is assumed that the - PC is INSN_SIZE aligned, and that each element of TRAMP contains - one INSN_SIZE instruction. It is also assumed that TRAMP[0] + PC is INSN_SIZE aligned, and that each element of INSN contains + one INSN_SIZE instruction. It is also assumed that INSN[0] contains the first instruction of the trampoline and hence the - address of the instruction matching TRAMP[0] is the trampoline's + address of the instruction matching INSN[0] is the trampoline's "func" address. */ int insn_size; ULONGEST insn[8]; + /* Initialize a trad-frame cache corresponding to the tramp-frame. - FUNC is the address of the instruction TRAMP[0] in memory. */ + FUNC is the address of the instruction INSN[0] in memory. */ void (*init) (const struct tramp_frame *self, struct frame_info *next_frame, struct trad_frame_cache *this_cache,