* linespec.c (decode_objc): Save current language around call to
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 23 May 2008 23:39:03 +0000 (23:39 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Fri, 23 May 2008 23:39:03 +0000 (23:39 +0000)
get_selected_block.

gdb/ChangeLog
gdb/linespec.c

index ee7cb5658a567f9ee7494c4df0cc2a00c97949de..11af398979cf8b21928639f26d364d1dbbc93af1 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-24  Andreas Schwab  <schwab@suse.de>
+
+       * linespec.c (decode_objc): Save current language around call to
+       get_selected_block.
+
 2008-05-23  Joel Brobecker  <brobecker@adacore.com>
 
        * valprint.h (get_array_bounds): Renames get_array_low_bound.
index 6386834ec0d40152bab0495e8cbf180d8cb4f25d..953e726bed5eb2825dcc177dc267d91696b0b025 100644 (file)
@@ -1116,8 +1116,16 @@ decode_objc (char **argptr, int funfirstline, struct symtab *file_symtab,
   if (file_symtab != NULL)
     block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_symtab), STATIC_BLOCK);
   else
-    block = get_selected_block (0);
-    
+    {
+      enum language save_language;
+
+      /* get_selected_block can change the current language when there is
+        no selected frame yet.  */
+      save_language = current_language->la_language;
+      block = get_selected_block (0);
+      set_language (save_language);
+    }
+
   copy = find_imps (file_symtab, block, *argptr, NULL, &i1, &i2); 
     
   if (i1 > 0)