This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch, testsuite] Set language after reaching to main function
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Yao Qi <yao at codesourcery dot com>
- Date: Thu, 4 Aug 2011 10:32:26 +0100
- Subject: Re: [patch, testsuite] Set language after reaching to main function
- References: <4E3A0DAB.603@codesourcery.com>
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