diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2008-05-23 23:39:03 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2008-05-23 23:39:03 +0000 |
commit | c4fc331b68cc8222e90fbdcc279b6d2bd915529c (patch) | |
tree | 31dffea61653e3fc2516822edac3bd6baf00cca7 /gdb | |
parent | d9c36a9152b92667378c667ad2a1e9fef66c4c73 (diff) | |
download | gdb-c4fc331b68cc8222e90fbdcc279b6d2bd915529c.zip gdb-c4fc331b68cc8222e90fbdcc279b6d2bd915529c.tar.gz gdb-c4fc331b68cc8222e90fbdcc279b6d2bd915529c.tar.bz2 |
* linespec.c (decode_objc): Save current language around call to
get_selected_block.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/linespec.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee7cb56..11af398 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/linespec.c b/gdb/linespec.c index 6386834..953e726 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -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) |