gdb_server: add support for architecture element

This change adds optional support for a target to report architecture
information in the target description to GDB. This is needed by some GDB
implementations to properly support remote target with custom behavior.
More information on the architecture element can be found here:

    https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html#Target-Description-Format

Change-Id: I57b19cae5ac3496256e4e5cc52cf6526ca5c322d
Signed-off-by: Steven Stallion <stallion@squareup.com>
Reviewed-on: http://openocd.zylin.com/4078
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
This commit is contained in:
Steven Stallion
2017-03-21 10:33:09 -05:00
committed by Matthias Welwarsky
parent d92adf8abf
commit e65acd889c
4 changed files with 33 additions and 1 deletions

View File

@@ -472,6 +472,13 @@ int target_remove_watchpoint(struct target *target,
int target_hit_watchpoint(struct target *target,
struct watchpoint **watchpoint);
/**
* Obtain the architecture for GDB.
*
* This routine is a wrapper for target->type->get_gdb_arch.
*/
const char *target_get_gdb_arch(struct target *target);
/**
* Obtain the registers for GDB.
*