diff options
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 661d22f..44dfed7 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -413,8 +413,7 @@ static char *msglist_sel; void start_msglist(void) { - struct selname *newobj = - (struct selname *) xmalloc (sizeof (struct selname)); + struct selname *newobj = XNEW (struct selname); newobj->next = selname_chain; newobj->msglist_len = msglist_len; @@ -626,7 +625,7 @@ selectors_info (char *regexp, int from_tty) printf_filtered (_("Selectors matching \"%s\":\n\n"), regexp ? regexp : "*"); - sym_arr = alloca (matches * sizeof (struct symbol *)); + sym_arr = XALLOCAVEC (struct symbol *, matches); matches = 0; ALL_MSYMBOLS (objfile, msymbol) { @@ -763,7 +762,7 @@ classes_info (char *regexp, int from_tty) { printf_filtered (_("Classes matching \"%s\":\n\n"), regexp ? regexp : "*"); - sym_arr = alloca (matches * sizeof (struct symbol *)); + sym_arr = XALLOCAVEC (struct symbol *, matches); matches = 0; ALL_MSYMBOLS (objfile, msymbol) { @@ -1035,8 +1034,7 @@ find_methods (char type, const char *theclass, const char *category, if (objc_csym == NULL) { - objc_csym = obstack_alloc (&objfile->objfile_obstack, - sizeof (*objc_csym)); + objc_csym = XOBNEW (&objfile->objfile_obstack, unsigned int); *objc_csym = objfile_csym; set_objfile_data (objfile, objc_objfile_data, objc_csym); } |