From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11354 invoked by alias); 2 Dec 2003 06:35:35 -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 11347 invoked from network); 2 Dec 2003 06:35:34 -0000 Received: from unknown (HELO frothingslosh.sfbay.redhat.com) (66.187.237.200) by sources.redhat.com with SMTP; 2 Dec 2003 06:35:34 -0000 Received: from frothingslosh.sfbay.redhat.com (localhost.localdomain [127.0.0.1]) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id hB26ZWOG032116; Mon, 1 Dec 2003 22:35:32 -0800 Received: (from rth@localhost) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8/Submit) id hB26ZWQs032114; Mon, 1 Dec 2003 22:35:32 -0800 X-Authentication-Warning: frothingslosh.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Tue, 02 Dec 2003 06:35:00 -0000 From: Richard Henderson To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] OSF/1 - "next" over prologueless function call Message-ID: <20031202063532.GC31561@redhat.com> References: <20031202042646.GW1186@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031202042646.GW1186@gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2003-12/txt/msg00042.txt.bz2 On Mon, Dec 01, 2003 at 08:26:46PM -0800, Joel Brobecker wrote: > + if (pc == func_start) > + return 1; > + > + if (pc == func_start + 8) > + { > + unsigned int inst; > + > + /* ldah $gp,n($t12) */ > + inst = alpha_read_insn (func_start); > + if ((inst & 0xffff0000) != 0x27bb0000) > + return 0; > + > + /* lda $gp,n($gp) */ > + inst = alpha_read_insn (func_start + 4); > + if ((inst & 0xffff0000) != 0x23bd0000) > + return 0; Is there any chance we could get hold of the symbol associated with this function start? On ELF detecting this condition can be streamlined to sym->st_other & STO_ALPHA_STD_GPLOAD == STO_ALPHA_STD_GPLOAD or from bfd, elf_link_hash_entry.other, though I don't remember off the top of my head how to get at the elf hash entry from asymbol. And yes indeed, the gnu tools do this same optimization. Both at compile time and link time. r~