From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6044 invoked by alias); 14 Jul 2010 18:52:02 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 6030 invoked by uid 22791); 14 Jul 2010 18:52:01 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4C3E0749.2030500@redhat.com> Date: Wed, 14 Jul 2010 18:52:00 -0000 From: sami wagiaalla User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Thunderbird/3.0.5 MIME-Version: 1.0 To: Project Archer Subject: language setting issue Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2010-q3/txt/msg00025.txt.bz2 For the most part doing this: if (current_language->la_language == language_cplus) works fine, but there is a scenario invoked by cp-relocate.exp which looks something like this: ./gdb ./testsuite/gdb.cp/cp-relocate.o -ex 'print func<1>(int)' -ex 'q' In this scenario if we check current_language->la_language it will be set to language_c. The problem is that current_language is set by checking the extension of the file of the symbol main which in this case does not exist. To solve this we could just pick an arbitrary objfile and check the language. This works of we can assume that all files have the same language. Otherwise we would have to set the language a per block bases. Thoughts ? Sami