Skip to content

Commit 677ccfb

Browse files
committed
target/espressif: change pseudo_ex_reason name as panic_reason
1 parent 2a486de commit 677ccfb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/target/espressif/esp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,15 @@ void esp_common_assist_debug_monitor_restore(struct target *target, uint32_t add
270270
int esp_common_read_pseudo_ex_reason(struct target *target)
271271
{
272272
struct esp_common *esp = target_to_esp_common(target);
273-
if (esp && esp->pseudo_ex_reason.addr) {
274-
uint8_t str[esp->pseudo_ex_reason.len + 1];
273+
if (esp && esp->panic_reason.addr) {
274+
uint8_t str[esp->panic_reason.len + 1];
275275
memset(str, 0x00, sizeof(str));
276-
int retval = target_read_memory(target, esp->pseudo_ex_reason.addr, 1, esp->pseudo_ex_reason.len, str);
276+
int retval = target_read_memory(target, esp->panic_reason.addr, 1, esp->panic_reason.len, str);
277277
if (retval == ERROR_OK)
278278
LOG_TARGET_INFO(target, "Halt cause (%s)", str);
279279
else
280280
LOG_TARGET_ERROR(target, "Pseudo exception reason read failed (%d)", retval);
281-
esp->pseudo_ex_reason.addr = 0;
281+
esp->panic_reason.addr = 0;
282282
return ERROR_OK;
283283
}
284284

src/target/espressif/esp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ struct esp_dbg_stubs {
8080
struct esp_dbg_stubs_desc desc;
8181
};
8282

83-
struct esp_pseudo_ex_reason {
84-
target_addr_t addr;
83+
struct esp_panic_reason {
84+
uint32_t addr;
8585
uint32_t len;
8686
};
8787

@@ -118,7 +118,7 @@ struct esp_common {
118118
struct esp_flash_breakpoints flash_brps;
119119
const struct algorithm_hw *algo_hw;
120120
struct esp_dbg_stubs dbg_stubs;
121-
struct esp_pseudo_ex_reason pseudo_ex_reason;
121+
struct esp_panic_reason panic_reason;
122122
};
123123

124124
struct esp_ops {

src/target/espressif/esp_semihosting.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ int esp_semihosting_common(struct target *target)
307307
if (retval == ERROR_OK) {
308308
struct esp_common *esp = target_to_esp_common(target);
309309
if (esp) {
310-
esp->pseudo_ex_reason.addr = semihosting_get_field(target, 0, fields);
311-
esp->pseudo_ex_reason.len = semihosting_get_field(target, 1, fields);
310+
esp->panic_reason.addr = semihosting_get_field(target, 0, fields);
311+
esp->panic_reason.len = semihosting_get_field(target, 1, fields);
312312
}
313313
}
314314
break;

0 commit comments

Comments
 (0)