From 53c551b7ca9c16f621072b09e45eb0c21fc7e91b Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Mon, 14 Oct 2002 01:50:44 +0000 Subject: [PATCH] parse.c: (length_of_subexp, prefixify_subexp): Handle OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF. --- gdb/ChangeLog | 5 +++++ gdb/parse.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5b61b98be9a..37c37a9e52d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-10-13 Adam Fedor + + * parse.c: (length_of_subexp, prefixify_subexp): Handle + OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF. + 2002-10-12 Adam Fedor * language.c (binop_result_type): Add language_objc to case. diff --git a/gdb/parse.c b/gdb/parse.c index 29b8e3c3709..5a5612fb3a2 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -830,6 +830,11 @@ 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 */ + oplen = 4; + args = 1 + longest_to_int (expr->elts[endpos - 2].longconst); + break; + case UNOP_MAX: case UNOP_MIN: oplen = 3; @@ -861,6 +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_NAME: case OP_EXPRSTRING: oplen = longest_to_int (expr->elts[endpos - 2].longconst); @@ -899,6 +906,7 @@ length_of_subexp (register struct expression *expr, register int endpos) /* C++ */ case OP_THIS: + case OP_SELF: oplen = 2; break; @@ -967,6 +975,11 @@ 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 */ + oplen = 4; + args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst); + break; + case UNOP_MIN: case UNOP_MAX: oplen = 3; @@ -997,6 +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_NAME: case OP_EXPRSTRING: oplen = longest_to_int (inexpr->elts[inend - 2].longconst); @@ -1035,6 +1050,7 @@ prefixify_subexp (register struct expression *inexpr, /* C++ */ case OP_THIS: + case OP_SELF: oplen = 2; break; -- 2.30.2