aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-17 20:35:09 +0000
committerTom Tromey <tromey@redhat.com>2011-06-17 20:35:09 +0000
commit7518bff55ab27e073e9d03b5d700d469d362c85d (patch)
tree579cfdef5223792e7a4eb9a299f24b5fd58629e9 /gdb/valops.c
parentaee28ec61ad1d4027a78cdbc1da0dcd9f43e2374 (diff)
downloadgdb-7518bff55ab27e073e9d03b5d700d469d362c85d.zip
gdb-7518bff55ab27e073e9d03b5d700d469d362c85d.tar.gz
gdb-7518bff55ab27e073e9d03b5d700d469d362c85d.tar.bz2
* value.h (value_of_this): Update.
(value_of_local): Remove. * valops.c (value_of_this): Rename from value_of_local. Change parameters. * p-exp.y (exp): Update. (variable): Likewise. * eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 6129bfe..9b3b90a 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3601,12 +3601,13 @@ value_full_object (struct value *argp,
inappropriate context. */
struct value *
-value_of_local (const char *name, int complain)
+value_of_this (const struct language_defn *lang, int complain)
{
struct symbol *func, *sym;
struct block *b;
struct value * ret;
struct frame_info *frame;
+ const char *name = lang->la_name_of_this;
if (!name)
{
@@ -3660,18 +3661,6 @@ value_of_local (const char *name, int complain)
return ret;
}
-/* C++/Objective-C: return the value of the class instance variable,
- if one exists. Flag COMPLAIN signals an error if the request is
- made in an inappropriate context. */
-
-struct value *
-value_of_this (int complain)
-{
- if (!current_language->la_name_of_this)
- return 0;
- return value_of_local (current_language->la_name_of_this, complain);
-}
-
/* Create a slice (sub-string, sub-array) of ARRAY, that is LENGTH
elements long, starting at LOWBOUND. The result has the same lower
bound as the original ARRAY. */