Skip to content

Commit

Permalink
esp/xtensa: Adds 'get_gdb_arch' target API
Browse files Browse the repository at this point in the history
  • Loading branch information
gerekon committed Aug 25, 2021
1 parent 3bd138a commit ed17035
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/target/esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ struct target_type esp32_target = {

.checksum_memory = xtensa_checksum_memory,

.get_gdb_arch = xtensa_get_gdb_arch,
.get_gdb_reg_list = xtensa_get_gdb_reg_list,

.run_algorithm = xtensa_run_algorithm,
Expand Down
1 change: 1 addition & 0 deletions src/target/esp32s2.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ struct target_type esp32s2_target = {

.checksum_memory = xtensa_checksum_memory,

.get_gdb_arch = xtensa_get_gdb_arch,
.get_gdb_reg_list = xtensa_get_gdb_reg_list,

.run_algorithm = xtensa_run_algorithm,
Expand Down
1 change: 1 addition & 0 deletions src/target/esp32s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ struct target_type esp32s3_target = {

.checksum_memory = xtensa_checksum_memory,

.get_gdb_arch = xtensa_get_gdb_arch,
.get_gdb_reg_list = xtensa_get_gdb_reg_list,

.run_algorithm = xtensa_run_algorithm,
Expand Down
5 changes: 5 additions & 0 deletions src/target/xtensa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,11 @@ void xtensa_target_deinit(struct target *target)
free(xtensa->sw_brps);
}

const char *xtensa_get_gdb_arch(struct target *target)
{
return "xtensa";
}

COMMAND_HELPER(xtensa_cmd_permissive_mode_do, struct xtensa *xtensa)
{
if (CMD_ARGC != 1)
Expand Down
1 change: 1 addition & 0 deletions src/target/xtensa.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ int xtensa_handle_target_event(struct target *target,
void xtensa_set_permissive_mode(struct target *target, bool state);
int xtensa_fetch_user_regs_u32(struct target *target);
int xtensa_queue_write_dirty_user_regs_u32(struct target *target);
const char *xtensa_get_gdb_arch(struct target *target);

extern const struct reg_arch_type xtensa_user_reg_u32_type;
extern const struct reg_arch_type xtensa_user_reg_u128_type;
Expand Down

0 comments on commit ed17035

Please sign in to comment.