remove strerror module
[deliverable/binutils-gdb.git] / gdb / objc-lang.c
index bcce4356c7de6e149cb2d818f00e0943e707be5d..90c589dc196f07c279016a5befddbbc3db400359 100644 (file)
@@ -26,6 +26,7 @@
 #include "expression.h"
 #include "parser-defs.h"
 #include "language.h"
+#include "varobj.h"
 #include "c-lang.h"
 #include "objc-lang.h"
 #include "exceptions.h"
@@ -33,7 +34,7 @@
 #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"
@@ -354,6 +355,7 @@ static const struct op_print objc_op_print_tab[] =
 
 const struct language_defn objc_language_defn = {
   "objective-c",               /* Language name */
+  "Objective-C",
   language_objc,
   range_check_off,
   case_sensitive_on,
@@ -389,6 +391,7 @@ const struct language_defn objc_language_defn = {
   default_get_string,
   NULL,                                /* la_get_symbol_name_cmp */
   iterate_over_symbols,
+  &default_varobj_ops,
   LANG_MAGIC
 };
 
@@ -1053,6 +1056,11 @@ uniquify_strings (VEC (const_char_ptr) **strings)
   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),
This page took 0.024359 seconds and 4 git commands to generate.