This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/4755

-- gerrit

commit b9169c63af73c388a276f1c36499ec6ea3803121
Author: Antonio Borneo <[email protected]>
Date:   Thu Nov 1 15:08:21 2018 +0100

    target/aarch64: add support for multi-architecture gdb
    
    GDB can be built for multi-architecture through the command
        ./configure --enable-targets=all && make
    Such multi-architecture GDB requires the target's architecture to
    be selected either manually by the user through the GDB command
    "set architecture" or automatically by the target description sent
    by the remote target (i.e. OpenOCD).
    
    Commit e65acd889c61a424c7bd72fdee5d6a3aee1d8504 ("gdb_server: add
    support for architecture element") already provides the required
    infrastructure to support multi-architecture gdb.
    
    aarch64-linux-gnu-gdb 8.2 uses "aarch64" as default architecture,
    but also supports the value "aarch64:ilp32" and all the values
    supported by arm-none-eabi-gdb.
    These values can be displayed on arm gdb prompt by typing
    "set architecture " followed by a TAB for autocompletion.
    
    Set the gdb architecture value for aarch64 target to "aarch64".
    
    Change-Id: I63e9769f47d8e73f048eb84fa73e082dd1c8e52c
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 454de9e..8fab3b5 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -2824,6 +2824,7 @@ struct target_type aarch64_target = {
        .deassert_reset = aarch64_deassert_reset,
 
        /* REVISIT allow exporting VFP3 registers ... */
+       .get_gdb_arch = armv8_get_gdb_arch,
        .get_gdb_reg_list = armv8_get_gdb_reg_list,
 
        .read_memory = aarch64_read_memory,
diff --git a/src/target/arm.h b/src/target/arm.h
index 10a053c..ea83d38 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -267,6 +267,7 @@ const char *arm_get_gdb_arch(struct target *target);
 int arm_get_gdb_reg_list(struct target *target,
                struct reg **reg_list[], int *reg_list_size,
                enum target_register_class reg_class);
+const char *armv8_get_gdb_arch(struct target *target);
 int armv8_get_gdb_reg_list(struct target *target,
                struct reg **reg_list[], int *reg_list_size,
                enum target_register_class reg_class);
diff --git a/src/target/armv8.c b/src/target/armv8.c
index 75ada89..39ce7e1 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -1668,6 +1668,11 @@ const struct command_registration 
armv8_command_handlers[] = {
        COMMAND_REGISTRATION_DONE
 };
 
+const char *armv8_get_gdb_arch(struct target *target)
+{
+       return "aarch64";
+}
+
 int armv8_get_gdb_reg_list(struct target *target,
        struct reg **reg_list[], int *reg_list_size,
        enum target_register_class reg_class)

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to