AArch64: Add gdbserver MTE support
[deliverable/binutils-gdb.git] / gdbsupport / common-utils.h
index 4429f086fce34d201a85ab087742b862ac57748a..1de747f186d04d01dc3b4bc2865fff86a5bd59be 100644 (file)
@@ -59,7 +59,11 @@ xfree (T *ptr)
 data type.  Use operator delete instead.");
 
   if (ptr != NULL)
-    free (ptr);                /* ARI: free */
+#ifdef GNULIB_NAMESPACE
+    GNULIB_NAMESPACE::free (ptr);      /* ARI: free */
+#else
+    free (ptr);                                /* ARI: free */
+#endif
 }
 
 
@@ -112,16 +116,8 @@ std::string extract_string_maybe_quoted (const char **arg);
 
 extern const char *safe_strerror (int);
 
-/* Return true if the start of STRING matches PATTERN, false otherwise.  */
-
-static inline bool
-startswith (const char *string, const char *pattern)
-{
-  return strncmp (string, pattern, strlen (pattern)) == 0;
-}
-
-/* Version of startswith that takes string_view arguments.  See comment
-   above.  */
+/* Version of startswith that takes string_view arguments.  Return
+   true if the start of STRING matches PATTERN, false otherwise.  */
 
 static inline bool
 startswith (gdb::string_view string, gdb::string_view pattern)
This page took 0.024595 seconds and 4 git commands to generate.