[Pdbg] [PATCH 10/14] libpdbg/p9chip.c: allow sreset on running threads

Nicholas Piggin npiggin at gmail.com
Thu Apr 12 18:59:49 AEST 2018


On Thu, 12 Apr 2018 14:24:24 +1000
Alistair Popple <alistair at popple.id.au> wrote:

> In general I have avoided making pdbg operations do things which were not
> explicitly requested as IMHO it's preferable to not alter system state in
> "unexpected" ways. However in this case it's probably ok. I forget though - does
> a thread automatically restart after sreset or will it remain in the stopped
> state?

sreset does start the target thread, yes.

I guess this is the crux of my concern, or the reason for the expert
vs dummies mode. And you even experts have implicit operations already
(e.g., special wakeup).

I found it was far easier to blow up your host with separate steps for
everything, than it was to have pdbg just do it all. I mean it depends
what you want to do really, but I think average user (and IPMI for nmi
command) wants a sreset to trigger crash/dump, and perhaps to dump some
registers, and do tracing.

If you have to stop first, you run the risk of the host watchdog kicking
in. I also ended up with a lot of just hangs that I never quite debugged,
maybe due to special wakeup not being cleared, or set twice, or de-asserted
at the wrong time, I don't know.

It's a tricky problem, I don't know the best answer. I don't know how
you're using it to debug low level hardware problems to start with!

Thanks,
Nick


More information about the Pdbg mailing list