From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9929 invoked by alias); 7 Jul 2008 22:59:23 -0000 Received: (qmail 9921 invoked by uid 22791); 7 Jul 2008 22:59:22 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Jul 2008 22:58:59 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m67MuLck027269; Tue, 8 Jul 2008 00:56:22 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m67MuLP2010832; Tue, 8 Jul 2008 00:56:21 +0200 (CEST) Date: Mon, 07 Jul 2008 22:59:00 -0000 Message-Id: <200807072256.m67MuLP2010832@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <200807072309.56077.pedro@codesourcery.com> (message from Pedro Alves on Mon, 7 Jul 2008 23:09:55 +0100) Subject: Re: Fix Ericsson DICOS inferior function calls References: <200807072309.56077.pedro@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00100.txt.bz2 > From: Pedro Alves > Date: Mon, 7 Jul 2008 23:09:55 +0100 > > Hi, > > This patch fixes inferior function calls on DICOS, by putting > the call dummy breakpoint location on the stack. The comments > in the patch describe why. > > Daniel approved this offline, so I checked it in. Hmm, the reason for providing frame_align() is pretty bogus; instruction alignment has little or nothing to do with stack alignment. It's just that most RISC ISAs require strict memory alignment at something that happens to be a multiple of the instruction size. I'm also not sure the frame_align() you wrote does what you think it does. IIRC, on i386, you'll actually need to align on an odd 8-byte border to get the performance benefit you mention; i386_push_dummy_call() should take care of that (but may currently not do that in all cases). I think we should get rid of generic_push_dummy_code(), and instead require that each target that puts the dummy breakpoint on the stack provides its own push_dummy_code() function. Could you provide one for DICOS? > 2008-07-07 Pedro Alves > > * i386-dicos-tdep.c: Include "inferior.h". > (i386_dicos_frame_align): New. > (i386_dicos_init_abi): Register i386_dicos_frame_align. Set call > dummy location ON_STACK. > * Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).