OSDN Git Service

2003-11-24 David Carlton <carlton@kealia.com>
authorcarlton <carlton>
Tue, 25 Nov 2003 01:44:05 +0000 (01:44 +0000)
committercarlton <carlton>
Tue, 25 Nov 2003 01:44:05 +0000 (01:44 +0000)
* generic/gdbtk.c (target_is_native): Replace STREQ by strcmp.
* generic/gdbtk-cmds.c (gdb_stop): Replace STREQ by strcmp.
(gdb_search): Replace STREQN by strncmp and DEPRECATED_SYMBOL_NAME
by SYMBOL_LINKAGE_NAME.
* generic/gdbtk-varobj.c (variable_format): Replace STREQN by
strncmp.

gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk-cmds.c
gdb/gdbtk/generic/gdbtk-varobj.c
gdb/gdbtk/generic/gdbtk.c

index 67629d5..a06e3ec 100644 (file)
@@ -1,3 +1,12 @@
+2003-11-24  David Carlton  <carlton@kealia.com>
+
+       * generic/gdbtk.c (target_is_native): Replace STREQ by strcmp.
+       * generic/gdbtk-cmds.c (gdb_stop): Replace STREQ by strcmp.
+       (gdb_search): Replace STREQN by strncmp and DEPRECATED_SYMBOL_NAME
+       by SYMBOL_LINKAGE_NAME.
+       * generic/gdbtk-varobj.c (variable_format): Replace STREQN by
+       strncmp.
+
 2003-11-11  David Carlton  <carlton@kealia.com>
 
        * generic/gdbtk-bp.c (gdb_find_bp_at_addr): Replace use of
index b0d0acb..def062c 100644 (file)
@@ -547,7 +547,7 @@ gdb_stop (ClientData clientData, Tcl_Interp *interp,
   if (objc > 1)
     {
       s = Tcl_GetStringFromObj (objv[1], NULL);
-      if (STREQ (s, "detach"))
+      if (strcmp (s, "detach") == 0)
        force = 1;
     }
 
@@ -1365,8 +1365,9 @@ gdb_search (ClientData clientData, Tcl_Interp *interp,
 
       /* Strip off some C++ special symbols, like RTTI and global
          constructors/destructors. */
-      if ((p->symbol != NULL && !STREQN (DEPRECATED_SYMBOL_NAME (p->symbol), "__tf", 4)
-          && !STREQN (DEPRECATED_SYMBOL_NAME (p->symbol), "_GLOBAL_", 8))
+      if ((p->symbol != NULL
+          && strncmp (SYMBOL_LINKAGE_NAME (p->symbol), "__tf", 4) != 0
+          && strncmp (SYMBOL_LINKAGE_NAME (p->symbol), "_GLOBAL_", 8) != 0)
          || p->msymbol != NULL)
        {
          elem = Tcl_NewListObj (0, NULL);
index 70e251f..3496d22 100644 (file)
@@ -474,15 +474,15 @@ variable_format (Tcl_Interp *interp, int objc,
       /* Set the format of VAR to given format */
       int len;
       char *fmt = Tcl_GetStringFromObj (objv[2], &len);
-      if (STREQN (fmt, "natural", len))
+      if (strncmp (fmt, "natural", len) == 0)
        varobj_set_display_format (var, FORMAT_NATURAL);
-      else if (STREQN (fmt, "binary", len))
+      else if (strncmp (fmt, "binary", len) == 0)
        varobj_set_display_format (var, FORMAT_BINARY);
-      else if (STREQN (fmt, "decimal", len))
+      else if (strncmp (fmt, "decimal", len) == 0)
        varobj_set_display_format (var, FORMAT_DECIMAL);
-      else if (STREQN (fmt, "hexadecimal", len))
+      else if (strncmp (fmt, "hexadecimal", len) == 0)
        varobj_set_display_format (var, FORMAT_HEXADECIMAL);
-      else if (STREQN (fmt, "octal", len))
+      else if (strncmp (fmt, "octal", len) == 0)
        varobj_set_display_format (var, FORMAT_OCTAL);
       else
        {
index c4bbf3f..c855358 100644 (file)
@@ -321,10 +321,11 @@ target_is_native (struct target_ops *t)
 {
   char *name = t->to_shortname;
 
-  if (STREQ (name, "exec") || STREQ (name, "hpux-threads")
-      || STREQ (name, "child") || STREQ (name, "procfs")
-      || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads")
-      || STREQ (name, "multi-thread"))
+  if (strcmp (name, "exec") == 0 || strcmp (name, "hpux-threads") == 0
+      || strcmp (name, "child") == 0 || strcmp (name, "procfs") == 0
+      || strcmp (name, "solaris-threads") == 0
+      || strcmp (name, "linuxthreads") == 0
+      || strcmp (name, "multi-thread") == 0)
     return 1;
 
   return 0;