From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9969 invoked by alias); 5 May 2012 01:31:24 -0000 Received: (qmail 9961 invoked by uid 22791); 5 May 2012 01:31:23 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 May 2012 01:31:10 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SQTq0-0001En-Mk from Maciej_Rozycki@mentor.com ; Fri, 04 May 2012 18:31:08 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 4 May 2012 18:31:08 -0700 Received: from [172.30.1.40] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Sat, 5 May 2012 02:31:06 +0100 Date: Sat, 05 May 2012 01:31:00 -0000 From: "Maciej W. Rozycki" To: Mark Kettenis CC: Joel Brobecker , Subject: Re: [RFA 1/2] mips: Switch inferior function calls to ON_STACK method. In-Reply-To: <201205042134.q44LY4Ax026920@glazunov.sibelius.xs4all.nl> Message-ID: References: <1336071802-13599-1-git-send-email-brobecker@adacore.com> <1336071802-13599-2-git-send-email-brobecker@adacore.com> <201205042134.q44LY4Ax026920@glazunov.sibelius.xs4all.nl> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: 2012-05/txt/msg00143.txt.bz2 Mark, > > Thanks for this work -- can you give me a reference to some background > > information as to why exactly we want to remove the AT_SYMBOL method? > > The AT_SYMBOL method relies on a magic symbol being present in the > binarie that's being debugged. There is no guarantee that that magic > symbol is actually present in your binary. And failing that the executable's entry point. Actually I have yet to see a binary that has that magic __CALL_DUMMY_ADDRESS symbol, so the fallback must have worked pretty well. Interestingly enough it was the MIPS target AT_SYMBOL was specifically added for: http://sourceware.org/ml/gdb-patches/2003-08/msg00076.html And that very patch regrettably removed the explanation of the actual reason of the whole arrangement -- the need to be able to debug a program in ROM that does not have an entry point (or I think, probably more accurately, rather has a read-only entry point such as the reset vector, so a breakpoint is not guaranteed to work there). Of course ON_STACK solves that in a more general manner, so that's the actual benefit from this change. That removes any doubt I might have had. Thanks for your input, including your other comments. Maciej