aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/expression.h14
-rw-r--r--gdb/objc-exp.y24
-rw-r--r--gdb/parse.c16
4 files changed, 34 insertions, 27 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 68e9ad7..a46a373 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2002-11-18 Adam Fedor <fedor@gnu.org>
+ * expression.h: Rename ObjC ops to OP_OBJC_MSGCALL,
+ OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF.
+ * parse.c (length_of_subexp, prefixify_subexp): Likewise.
+ * objc-exp.y: Likewise.
+
+2002-11-18 Adam Fedor <fedor@gnu.org>
+
* gdb/parser-defs.h: (struct objc_class_str): New structure
for parsing ObjC classes.
diff --git a/gdb/expression.h b/gdb/expression.h
index e7f9d48..66cc119 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -181,11 +181,11 @@ enum exp_opcode
making three exp_elements. */
OP_FUNCALL,
- /* OP_MSGCALL is followed by a string in the next exp_element and then an
+ /* OP_OBJC_MSGCALL is followed by a string in the next exp_element and then an
integer. The string is the selector string. The integer is the number
of arguments to the message call. That many plus one values are used,
the first one being the object pointer. This is an Objective C message */
- OP_MSGCALL,
+ OP_OBJC_MSGCALL,
/* This is EXACTLY like OP_FUNCALL but is semantically different.
In F77, array subscript expressions, substring expressions
@@ -283,12 +283,12 @@ enum exp_opcode
It just comes in a tight (OP_THIS, OP_THIS) pair. */
OP_THIS,
- /* Objective-C: OP_SELF is just a placeholder for the class instance
- variable. It just comes in a tight (OP_SELF, OP_SELF) pair. */
- OP_SELF,
+ /* Objective-C: OP_OBJC_SELF is just a placeholder for the class instance
+ variable. It just comes in a tight (OP_OBJC_SELF, OP_OBJC_SELF) pair. */
+ OP_OBJC_SELF,
/* Objective C: "@selector" pseudo-operator */
- OP_SELECTOR,
+ OP_OBJC_SELECTOR,
/* OP_SCOPE surrounds a type name and a field name. The type
name is encoded as one element, but the field name stays as
@@ -320,7 +320,7 @@ enum exp_opcode
OP_EXPRSTRING,
/* An Objective C Foundation Class NSString constant */
- OP_NSSTRING,
+ OP_OBJC_NSSTRING,
};
union exp_element
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index c1971f7..cb9bb45 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -341,9 +341,9 @@ exp : '[' TYPENAME
start_msglist();
}
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
@@ -356,18 +356,18 @@ exp : '[' CLASSNAME
start_msglist();
}
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
exp : '[' exp
{ start_msglist(); }
msglist ']'
- { write_exp_elt_opcode (OP_MSGCALL);
+ { write_exp_elt_opcode (OP_OBJC_MSGCALL);
end_msglist();
- write_exp_elt_opcode (OP_MSGCALL);
+ write_exp_elt_opcode (OP_OBJC_MSGCALL);
}
;
@@ -565,9 +565,9 @@ exp : VARIABLE
exp : SELECTOR
{
- write_exp_elt_opcode (OP_SELECTOR);
+ write_exp_elt_opcode (OP_OBJC_SELECTOR);
write_exp_string ($1);
- write_exp_elt_opcode (OP_SELECTOR); }
+ write_exp_elt_opcode (OP_OBJC_SELECTOR); }
exp : SIZEOF '(' type ')' %prec UNARY
{ write_exp_elt_opcode (OP_LONG);
@@ -605,9 +605,9 @@ exp : STRING
exp : NSSTRING /* ObjC NextStep NSString constant
* of the form '@' '"' string '"'.
*/
- { write_exp_elt_opcode (OP_NSSTRING);
+ { write_exp_elt_opcode (OP_OBJC_NSSTRING);
write_exp_string ($1);
- write_exp_elt_opcode (OP_NSSTRING); }
+ write_exp_elt_opcode (OP_OBJC_NSSTRING); }
;
block : BLOCKNAME
@@ -756,8 +756,8 @@ variable: name_not_typename
if (innermost_block == 0 ||
contained_in (block_found, innermost_block))
innermost_block = block_found;
- write_exp_elt_opcode (OP_SELF);
- write_exp_elt_opcode (OP_SELF);
+ write_exp_elt_opcode (OP_OBJC_SELF);
+ write_exp_elt_opcode (OP_OBJC_SELF);
write_exp_elt_opcode (STRUCTOP_PTR);
write_exp_string ($1.stoken);
write_exp_elt_opcode (STRUCTOP_PTR);
diff --git a/gdb/parse.c b/gdb/parse.c
index 5d81dfd..8cdd87e 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -830,7 +830,7 @@ length_of_subexp (register struct expression *expr, register int endpos)
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
- case OP_MSGCALL: /* Objective C message (method) call */
+ case OP_OBJC_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
@@ -866,8 +866,8 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* fall through */
case OP_M2_STRING:
case OP_STRING:
- case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
- case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
+ case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (expr->elts[endpos - 2].longconst);
@@ -906,7 +906,7 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;
@@ -975,7 +975,7 @@ prefixify_subexp (register struct expression *inexpr,
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
- case OP_MSGCALL: /* Objective C message (method) call */
+ case OP_OBJC_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
@@ -1010,8 +1010,8 @@ prefixify_subexp (register struct expression *inexpr,
/* fall through */
case OP_M2_STRING:
case OP_STRING:
- case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
- case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
+ case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
@@ -1050,7 +1050,7 @@ prefixify_subexp (register struct expression *inexpr,
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;