Keith,
Here is a small patch(a one line change) to kdb/kdbmain.c(v1.8, kernel 2.4.9)
of to enable kdb to be called from DProbes.
Presently, when kdb is called with KDB_REASON_CALL, it builds its own register
frame. Here it is changed to do so only if no frame is supplied to kdb() and
use the frame if it is supplied to kdb(). By doing this, DProbes (or any other
facililty) can invoke kdb by supplying its own registers and obtain required
backtrace inside kdb.
If you find this ok, could you please incorporate this in your next releases,
so that future versions of DProbes can make use of exit to kdb facility.
Regards,
Bharata.
--
Bharata B Rao,
IBM Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: 91-80-5262355 Ex: 3962
Mail: [EMAIL PROTECTED]
--- kdbmain.c Sun Sep 16 11:50:31 2001
+++ kdbmain.c.regs Sun Sep 16 13:09:30 2001
@@ -790,7 +790,8 @@
case KDB_REASON_SWITCH:
kdb_printf("due to cpu switch\n");
break;
- case KDB_REASON_CALL: /* drop through */
+ case KDB_REASON_CALL:
+ if (ef) break; /* drop through if regs is not specified */
case KDB_REASON_PANIC:
if (reason == KDB_REASON_CALL)
kdb_printf("due to direct function call\n");