From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88133 invoked by alias); 6 Feb 2017 19:56:10 -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 88124 invoked by uid 89); 6 Feb 2017 19:56:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:4dd0f39, H*MI:sk:4dd0f39, H*i:sk:4dd0f39 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Feb 2017 19:56:08 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1capOQ-0003A2-Ca from Luis_Gustavo@mentor.com ; Mon, 06 Feb 2017 11:56:06 -0800 Received: from [172.30.11.152] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 6 Feb 2017 11:56:02 -0800 Reply-To: Luis Machado Subject: Re: [PATCH,v2] Make language setting tests more robust 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> <693288e6-921d-7ff2-e81f-4aa8ccdd75a3@redhat.com> <932c60a6-c132-2a93-22f2-c909edc18bc0@codesourcery.com> <2f219b64-e213-e5c1-35d2-3166c5dfe9c2@redhat.com> <40ce75b2-3e49-67b9-94e0-5d55e98ee5f9@codesourcery.com> <4dd0f39e-d2db-dbcb-a983-f9c10fd0c0bd@redhat.com> To: Pedro Alves , CC: From: Luis Machado Message-ID: Date: Mon, 06 Feb 2017 19:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <4dd0f39e-d2db-dbcb-a983-f9c10fd0c0bd@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00138.txt.bz2 On 02/06/2017 12:24 PM, Pedro Alves wrote: > On 02/06/2017 06:22 PM, Luis Machado wrote: >> On 02/06/2017 12:08 PM, Pedro Alves wrote: >>> On 02/06/2017 06:04 PM, Luis Machado wrote: >>> >>>> That returns language_asm for me. Supposedly because gdb has seen asm >>>> from glibc and then sticked with it when it reached the test program's >>>> main. And the program has no debug info. >>> >>> No, I don't think that is why. What sticks is "current_language", not >>> the frame's language. >> >> True. gdb is still seeing asm for the frame with main though. But that >> sounds like an expected outcome. > > Why? Where is GDB retrieving that from? Did you step through > get_frame_language? Ok, here's what i'm seeing so far. The current language is stuck in language_asm, even though the frame (frame of main) is supposed to be language_c (points to a C file, start_c.c). The funny thing is that right after connecting to the remote target, if you "show language", it doesn't emit any warnings and it keeps seeing a previous .S file (from the entry point), therefore the frame's language is language_asm, matching current_language. Attempting a backtrace shows the language mismatch warning, since the frame's language is then resolved to language_c (frame of main). Maybe current_language is not being updated when it should (from language_asm to language_c)? And there also seems to be a hiccup in the case where i can still see a frame pointing to the .S file, even though the current frame is the frame of main. It may be a bug after all.