From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30084 invoked by alias); 31 Jul 2007 01:08:35 -0000 Received: (qmail 30076 invoked by uid 22791); 31 Jul 2007 01:08:35 -0000 X-Spam-Check-By: sourceware.org Received: from smtp104.biz.mail.mud.yahoo.com (HELO smtp104.biz.mail.mud.yahoo.com) (68.142.200.252) by sourceware.org (qpsmtpd/0.31) with SMTP; Tue, 31 Jul 2007 01:08:31 +0000 Received: (qmail 96617 invoked from network); 31 Jul 2007 01:08:29 -0000 Received: from unknown (HELO ?192.168.1.100?) (wenbo.yang@simplnano.com@211.101.21.42 with plain) by smtp104.biz.mail.mud.yahoo.com with SMTP; 31 Jul 2007 01:08:28 -0000 X-YMail-OSG: yxlH1M4VM1nkGwI2mKrJk5yBQFl.tOdH1srouY.TVFikCUY0PEoKujcKC1ffopOWS6sI2I2JdiEbmj5HT29Jqt8ZQQ-- Message-ID: <46AE8B7C.5000502@simplnano.com> Date: Tue, 31 Jul 2007 03:51:00 -0000 From: Wenbo Yang User-Agent: Thunderbird 2.0.0.4 (X11/20070625) MIME-Version: 1.0 To: Michael Eager CC: Mark Kettenis , gdb@sources.redhat.com Subject: Re: frame cache References: <46A648BC.8070105@eagercon.com> <46A98934.5040902@simplnano.com> <46AE5570.7080202@eagercon.com> In-Reply-To: <46AE5570.7080202@eagercon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00217.txt.bz2 > Michael Eager Wrote: >> It depends on target . If you register dwarf2 frame sniffers to >> gdbarch, and your compiler can emit proper debugging information, gdb >> will not call analyze_prologue(). At least for our target(I did the >> porting), it works as Mark Kettenis said: >> "prologue analysis should only be done as a last resort, i.e. when >> proper debug information is not available. " > > Which target? Our chip is still under development, so no target name published. >> Because if you want to use debugging information to skip prologue, you >> write the code in this function. So, test should be place here in this >> function. > > As I mentioned, in x86 or PowerPC there is no code to bypass analyzing > the prologue, even if there is debug info. If prologue analysis is > truly to be done "only as a last resort", and I agree that this should > be the case, then this seems not to be represented in the gdb code. > > If I've missed where this is done, feel free to point me at the correct > code. I'm sorry I didn't find it too in x86. But x86 has many files, I'm not sure I have read through them. In mips-tdep.c, in mips_skip_prologue() , this function "skip_prologue_using_sal()" is using the debugging information, i.e. skip prologue using symbol and line. If x86 doesn't use debugging information, maybe it has some universal consideration on using it, e.g. some compiler can't emit proper debugging information. From my experience, if your compiler can't give all right debugging information, your debugging will encounter strange problems, what is worse than not using them(exclude the base info as symbols). Regards, Wenbo -- Wenbo Yang The State Key Lab. of Information Security Graduate School of CAS, 19A Yuquan Road, Beijing, China Homepage: http://solrex.cn SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China Phone: +86-10-5126-6989 --- Email: wenbo.yang@simplnano.com