Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target/riscv: report info about target during poll #1002

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/target/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2712,9 +2712,17 @@ static int riscv_get_gdb_reg_list(struct target *target,

static int riscv_arch_state(struct target *target)
{
assert(target->state == TARGET_HALTED);
const bool semihosting_active = target->semihosting &&
target->semihosting->is_active;
LOG_USER("%s halted due to %s.%s",
target_name(target),
debug_reason_name(target),
semihosting_active ? " Semihosting is active." : "");
struct target_type *tt = get_target_type(target);
if (!tt)
return ERROR_FAIL;
JanMatCodasip marked this conversation as resolved.
Show resolved Hide resolved
assert(tt->arch_state);
return tt->arch_state(target);
}

Expand Down
Loading