Fix breakpoint condition that use member variables.

* valops.c (check_field): Remove.
        (check_field_in): Rename to check_field.
        (value_of_this): Use la_name_of_this.
        * value.h (check_field): Adjust prototype.

        * language.h (la_value_of_this): Rename to la_name_of_this.
        * language.c (unknown_language_defn): Specify "this" for
        name_of_this.
        (auto_language_defn): Likewise.
        (local_language_defn): Likewise.
        * ada-lang.c (ada_language_defn): Adjust comment.
        * c-lang.c (c_language_defn): Adjust comment.
        (cplus_language_defn): Specify "this" for name_of_this.
        (asm_language_defn): Adjust comment.
        (minimal_language_defn): Adjust comment.
        * f-lang.c (f_language_defn): Specify NULL for name_of_this.
        * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
        * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
        * objc-lang.c (objc_language_defn): Specify "self" for
        name_of_this.
        * p-lang.c (pascal_language_defn): Specify "this" for
        name_of_this.
        * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.

        * symtab.c (lookup_symbol_aux): Lookup "this" in the
        proper scope, and check for field in type of "this", without
        trying to create a value.
This commit is contained in:
Vladimir Prus
2008-04-06 08:56:37 +00:00
parent 2344873715
commit 2b2d9e11a0
17 changed files with 133 additions and 73 deletions

View File

@ -206,14 +206,10 @@ struct language_defn
/* Now come some hooks for lookup_symbol. */
/* If this is non-NULL, lookup_symbol will do the 'field_of_this'
check, using this function to find the value of this. */
/* If this is non-NULL, specifies the name that of the implicit
local variable that refers to the current object instance. */
/* FIXME: carlton/2003-05-19: Audit all the language_defn structs
to make sure we're setting this appropriately: I'm sure it
could be NULL in more languages. */
struct value *(*la_value_of_this) (int complain);
char *la_name_of_this;
/* This is a function that lookup_symbol will call when it gets to
the part of symbol lookup where C looks up static and global