diff options
author | Stu Grossman <grossman@cygnus> | 1998-06-10 23:29:59 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1998-06-10 23:29:59 +0000 |
commit | f6d23b6f3bc8e82684fc24b2d4d06ffeac38f509 (patch) | |
tree | fac622536d092e1dc9558550cf799fa8c784324f /gdb/language.c | |
parent | a27a2a8de49c4bb4fb9cc9cbe911370feb344d18 (diff) | |
download | gdb-f6d23b6f3bc8e82684fc24b2d4d06ffeac38f509.zip gdb-f6d23b6f3bc8e82684fc24b2d4d06ffeac38f509.tar.gz gdb-f6d23b6f3bc8e82684fc24b2d4d06ffeac38f509.tar.bz2 |
* c-exp.y: Fix problems with parsing "'foo.bar'::func". Some languages
allow symbols with dots.
* gdbtypes.c (check_stub_method): Cosmetic. Use more descriptive
names for parameters.
start-sanitize-java
* jv-exp.y: Parser now accepts primitive types.
* (parse_number): Use correct ifdef for scanf long double support.
* jv-lang.c (java_array_type): Initial cut at array support.
end-sanitize-java
* language.c language.h (set_language): Now returns previous language.
* symtab.c (find_methods): Make static. Cosmetic changes, including
indentation, and adding descriptive comments. Move local variable defs
into the block they are used in.
* Don't call check_stub_method any more. Use gdb_mangle_name to
generate the full method name. find_method doesn't need all the other
goobldegook that check_stub_method does.
* (gdb_mangle_name): Use more descriptive names for parameters. Fix
comment.
start-sanitize-java
* (lookup_partial_symbol lookup_block_symbol): Check for java to
ensure we can find mangled names.
end-sanitize-java
* (decode_line_1): Move local variable defs into the block they are
used in. (Improves code readability.)
Diffstat (limited to 'gdb/language.c')
-rw-r--r-- | gdb/language.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/language.c b/gdb/language.c index 2a4a1b3..47bf441 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -345,13 +345,16 @@ set_type_range() set_range_str(); } -/* Set current language to (enum language) LANG. */ +/* Set current language to (enum language) LANG. Returns previous language. */ -void +enum language set_language(lang) enum language lang; { int i; + enum language prev_language; + + prev_language = current_language->la_language; for (i = 0; i < languages_size; i++) { if (languages[i]->la_language == lang) { @@ -361,6 +364,8 @@ set_language(lang) break; } } + + return prev_language; } /* This page contains functions that update the global vars |