Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2003 23:04:54 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        arch@freebsd.org
Subject:   backtrace() not printing to kernel log
Message-ID:  <20030517230020.B87908@root.org>

next in thread | raw e-mail | index | archive | help
I've found an annoyance when tracking down a new LoR.  Since
db_print_backtrace() uses db_printf() instead of printf(), the backtrace
doesn't make it to the kernel buffer but is printed directly to the
console.

dmesg:
lock order reversal
 1st 0xc35d5098 vm object (vm object) @ /usr/src/sys/vm/vm_object.c:512
 2nd 0xc082f110 system map (system map) @ /usr/src/sys/vm/vm_kern.c:325
Stack backtrace:

I looked into how to fix this but couldn't come up with a good idea.  The
most obvious thing to do is use a function pointer and check if the
debugger is active.  If so, use db_printf(), otherwise use printf().  But
there doesn't seem to be an architecturally clean way to do this.  Ideas?

-Nate


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030517230020.B87908>