This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
language setting issue
- From: sami wagiaalla <swagiaal at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Wed, 14 Jul 2010 14:51:53 -0400
- Subject: language setting issue
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