PERFORCE change 54792 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Jun 13 05:58:41 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=54792
Change 54792 by marcel at marcel_nfs on 2004/06/13 05:56:44
Remove references to td_last_frame. All backtraces start off with
a call frame now. Use the new kdb_thr_ctx() to get the initial
context of the given thread.
Affected files ...
.. //depot/projects/gdb/sys/i386/i386/db_trace.c#7 edit
Differences ...
==== //depot/projects/gdb/sys/i386/i386/db_trace.c#7 (text+ko) ====
@@ -429,7 +429,6 @@
db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
char *modif)
{
- struct trapframe *tf;
struct thread *td;
td = (have_addr) ? kdb_thr_lookup(addr) : kdb_thread;
@@ -437,9 +436,7 @@
db_printf("Thread %d not found\n", addr);
return;
}
- tf = td->td_last_frame;
- db_backtrace(td, tf, (struct i386_frame *)tf->tf_ebp,
- (db_addr_t)tf->tf_eip, count);
+ db_trace_thread(td, count);
}
void
@@ -459,11 +456,11 @@
int
db_trace_thread(struct thread *thr, int count)
{
- struct trapframe *tf;
+ struct pcb *ctx;
- tf = thr->td_last_frame;
- return (db_backtrace(thr, tf, (struct i386_frame *)tf->tf_ebp,
- (db_addr_t)tf->tf_eip, count));
+ ctx = kdb_thr_ctx(thr);
+ return (db_backtrace(thr, NULL, (struct i386_frame *)ctx->pcb_ebp,
+ ctx->pcb_eip, count));
}
int
More information about the p4-projects
mailing list