This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v3 08/10] Objective-C language
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Tom Tromey <tromey at redhat dot com>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Sat, 25 Jan 2014 03:57:45 -0200
- Subject: [PATCH v3 08/10] Objective-C language
- Authentication-results: sourceware.org; auth=none
- References: <1390629467-27139-1-git-send-email-sergiodj at redhat dot com>
Patch for the Objective-C language. Since we don't have gdb/objc-exp.y
anymore, this only touches on the lang files.
2014-01-25 Sergio Durigan Junior <sergiodj@redhat.com>
* 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 d79f361..258dba0 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -465,7 +465,7 @@ add_msglist(struct stoken *str, int addcolon)
}
int
-end_msglist(void)
+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);
xfree(p);
- write_exp_elt_longcst (val); /* Number of args */
+ write_exp_elt_longcst (ps, val); /* Number of args */
xfree(sel);
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);
--
1.7.11.7