From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8748 invoked by alias); 4 Aug 2011 09:32:47 -0000 Received: (qmail 8740 invoked by uid 22791); 4 Aug 2011 09:32:46 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Aug 2011 09:32:31 +0000 Received: (qmail 19958 invoked from network); 4 Aug 2011 09:32:31 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Aug 2011 09:32:31 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch, testsuite] Set language after reaching to main function Date: Thu, 04 Aug 2011 09:32:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: Yao Qi References: <4E3A0DAB.603@codesourcery.com> In-Reply-To: <4E3A0DAB.603@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201108041032.27014.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2011-08/txt/msg00066.txt.bz2 On Thursday 04 August 2011 04:10:35, Yao Qi wrote: > I find some similar failures below when I examine gdb test result, > > FAIL: gdb.cp/cplusfuncs.exp: set language c++ > FAIL: gdb.cp/inherit.exp: set language c++ > FAIL: gdb.base/callfuncs.exp: set language c > > They are all caused by warning emitted by gdb "Warning: the current > language does not match this frame.". I examined the frame like this: > > (gdb) info frame > Stack level 0, frame at 0x40017780: > pc = 0x40000000 in _reset_ram > (reset-ram.S:24); > saved pc 0x40000a5c > source language asm. > Arglist at 0x40017780, args: > Locals at 0x40017780, Previous frame's sp is 0x40017780 > > My gdb is working with bare-mental board, and start up code is written > in assembly. That is the reason why gdb emit such warning when we set > language while pc is still within assembly code. > > This patch is to address this problem by moving "set language" after > program hits breakpoint on main. > > OK? Makes sense to me. Okay. -- Pedro Alves