From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67228 invoked by alias); 6 Feb 2017 16:51:01 -0000 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 Received: (qmail 67214 invoked by uid 89); 6 Feb 2017 16:51:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:get_fra, printf_filtered X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Feb 2017 16:50:59 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B158C00AFC8; Mon, 6 Feb 2017 16:50:59 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CF95899F7; Mon, 6 Feb 2017 16:50:56 +0000 (UTC) Subject: Re: [PATCH,v2] Make language setting tests more robust To: Luis Machado , gdb-patches@sourceware.org References: <1485962220-31071-1-git-send-email-lgustavo@codesourcery.com> <1485980466-711-1-git-send-email-lgustavo@codesourcery.com> <4423d3ac-814c-2d71-e5fd-ed27368f02e1@redhat.com> <22cf411e-ba69-723d-8289-71b636313c39@codesourcery.com> Cc: simon.marchi@polymtl.ca From: Pedro Alves Message-ID: <693288e6-921d-7ff2-e81f-4aa8ccdd75a3@redhat.com> Date: Mon, 06 Feb 2017 16:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <22cf411e-ba69-723d-8289-71b636313c39@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00123.txt.bz2 On 02/06/2017 02:54 PM, Luis Machado wrote: > > The story here is that i noticed 3 tests with such a problem: > > FAIL: gdb.compile/compile-ifunc.exp: nodebug: set language c > FAIL: gdb.dwarf2/data-loc.exp: set language ada > FAIL: gdb.dwarf2/dynarr-ptr.exp: set language ada > > And my build had a glibc with debugging symbols and sources, therefore > GDB had set the initial language to asm before main. There's a comment about that in gdb.compile/compile-ifunc.exp: # This binary has no debug information, so force the language to C in case # GDB happened to see real asm code when it stopped at the entry point # when talking to a remote target, like gdbserver. This guarantees the # feature check below will work. gdb_test_no_output "set language c" "" So the question is, why did the gdb_test_no_output work back then, and doesn't now? In top.c:check_frame_language_change() [...] if (has_stack_frames ()) { enum language flang; flang = get_frame_language (frame); if (!warned && flang != language_unknown && flang != current_language->la_language) { printf_filtered ("%s\n", lang_frame_mismatch_warn); warned = 1; } what does get_frame_language return? Isn't it returning language_unknown for you? Why not? > FAIL: gdb.dwarf2/data-loc.exp: set language ada > FAIL: gdb.dwarf2/dynarr-ptr.exp: set language ada Likewise. Thanks, Pedro Alves