This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v4 08/10] Objective-C language

Patch for the Objective-C language.  Since we don't have gdb/objc-exp.y
anymore, this only touches on the lang files.

2014-03-22  Sergio Durigan Junior  <>

	* objc-lang.c (end_msglist): Add "struct parser_state" argument.
	* objc-lang.h: Forward declare "struct parser_state".
	(end_msglist): Add "struct parser_state" argument.
 gdb/objc-lang.c | 8 ++++----
 gdb/objc-lang.h | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 4327895..68f0d10 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -465,7 +465,7 @@ add_msglist(struct stoken *str, int addcolon)
+end_msglist (struct parser_state *ps)
   int val = msglist_len;
   struct selname *sel = selname_chain;
@@ -475,12 +475,12 @@ end_msglist(void)
   selname_chain = sel->next;
   msglist_len = sel->msglist_len;
   msglist_sel = sel->msglist_sel;
-  selid = lookup_child_selector (parse_gdbarch, p);
+  selid = lookup_child_selector (parse_gdbarch (ps), p);
   if (!selid)
     error (_("Can't find selector \"%s\""), p);
-  write_exp_elt_longcst (selid);
+  write_exp_elt_longcst (ps, selid);
-  write_exp_elt_longcst (val);	/* Number of args */
+  write_exp_elt_longcst (ps, val);	/* Number of args */
   return val;
diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h
index 6ba576a..df1fe53 100644
--- a/gdb/objc-lang.h
+++ b/gdb/objc-lang.h
@@ -26,6 +26,7 @@ struct stoken;
 struct value;
 struct block;
+struct parser_state;
 extern CORE_ADDR lookup_objc_class     (struct gdbarch *gdbarch,
 					char *classname);
@@ -45,7 +46,7 @@ extern struct value *value_nsstring (struct gdbarch *gdbarch,
 /* for parsing Objective C */
 extern void start_msglist (void);
 extern void add_msglist (struct stoken *str, int addcolon);
-extern int end_msglist (void);
+extern int end_msglist (struct parser_state *);
 struct symbol *lookup_struct_typedef (char *name, const struct block *block,
 				      int noerr);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]