#include "expression.h"
#include "parser-defs.h"
#include "language.h"
+#include "varobj.h"
#include "c-lang.h"
#include "objc-lang.h"
#include "exceptions.h"
#include "value.h"
#include "symfile.h"
#include "objfiles.h"
-#include "gdb_string.h" /* for strchr */
+#include <string.h> /* for strchr */
#include "target.h" /* for target_has_execution */
#include "gdbcore.h"
#include "gdbcmd.h"
const struct language_defn objc_language_defn = {
"objective-c", /* Language name */
+ "Objective-C",
language_objc,
range_check_off,
case_sensitive_on,
default_get_string,
NULL, /* la_get_symbol_name_cmp */
iterate_over_symbols,
+ &default_varobj_ops,
LANG_MAGIC
};
const char *elem, *last = NULL;
int out;
+ /* If the vector is empty, there's nothing to do. This explicit
+ check is needed to avoid invoking qsort with NULL. */
+ if (VEC_empty (const_char_ptr, *strings))
+ return;
+
qsort (VEC_address (const_char_ptr, *strings),
VEC_length (const_char_ptr, *strings),
sizeof (const_char_ptr),