diff options
author | marcel <marcel@FreeBSD.org> | 2009-11-05 06:27:46 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-11-05 06:27:46 +0000 |
commit | 6c4039b0183b54edca5da8b42257c5849493212f (patch) | |
tree | cccb696270e90881b75fb9b7918742409302a214 /sys | |
parent | e41bf8fcdea6aee2b5a9b897351aa105237ff872 (diff) | |
download | FreeBSD-src-6c4039b0183b54edca5da8b42257c5849493212f.zip FreeBSD-src-6c4039b0183b54edca5da8b42257c5849493212f.tar.gz |
Implement db_trace_thread() by calling db_stack_trace_cmd() and
passing a frame pointer that comes from the thread context. This
fixes DDB backtraces by not unwinding debugger functions first.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/arm/db_trace.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arm/arm/db_trace.c b/sys/arm/arm/db_trace.c index c1cb998..9bc3cbc 100644 --- a/sys/arm/arm/db_trace.c +++ b/sys/arm/arm/db_trace.c @@ -194,13 +194,10 @@ db_md_set_watchpoint(db_expr_t addr, db_expr_t size) int db_trace_thread(struct thread *thr, int count) { - uint32_t addr; + struct pcb *ctx; - if (thr == curthread) - addr = (uint32_t)__builtin_frame_address(0); - else - addr = thr->td_pcb->un_32.pcb32_r11; - db_stack_trace_cmd(addr, -1); + ctx = kdb_thr_ctx(thr); + db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1); return (0); } |