]> git.sur5r.net Git - openocd/blobdiff - src/target/target_type.h
gdb_server: add support for architecture element
[openocd] / src / target / target_type.h
index fbbd57d980590e7ec8166cca723ce80098ff17d4..a8928911f65661453b0550416a25c222aa072f64 100644 (file)
@@ -88,6 +88,15 @@ struct target_type {
        int (*deassert_reset)(struct target *target);
        int (*soft_reset_halt)(struct target *target);
 
+       /**
+        * Target architecture for GDB.
+        *
+        * The string returned by this function will not be automatically freed;
+        * if dynamic allocation is used for this value, it must be managed by
+        * the target, ideally by caching the result for subsequent calls.
+        */
+       const char *(*get_gdb_arch)(struct target *target);
+
        /**
         * Target register access for GDB.  Do @b not call this function
         * directly, use target_get_gdb_reg_list() instead.