* The "ints" KDL command now also prints function names, and the interrupt
function argument data. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27784 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+19
-7
@@ -16,6 +16,7 @@
|
|||||||
#include <arch/debug_console.h>
|
#include <arch/debug_console.h>
|
||||||
#include <arch/int.h>
|
#include <arch/int.h>
|
||||||
#include <boot/kernel_args.h>
|
#include <boot/kernel_args.h>
|
||||||
|
#include <elf.h>
|
||||||
#include <util/kqueue.h>
|
#include <util/kqueue.h>
|
||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ dump_int_statistics(int argc, char **argv)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
kprintf("int %3d, enabled %ld, handled %8lld, unhandled %8lld%s%s\n",
|
kprintf("int %3d, enabled %ld, handled %8lld, unhandled %8lld%s%s\n",
|
||||||
i, sVectors[i].enable_count, sVectors[i].handled_count,
|
i, sVectors[i].enable_count, sVectors[i].handled_count,
|
||||||
sVectors[i].unhandled_count,
|
sVectors[i].unhandled_count,
|
||||||
B_SPINLOCK_IS_LOCKED(&sVectors[i].vector_lock) ? ", ACTIVE" : "",
|
B_SPINLOCK_IS_LOCKED(&sVectors[i].vector_lock) ? ", ACTIVE" : "",
|
||||||
sVectors[i].handler_list.next == &sVectors[i].handler_list
|
sVectors[i].handler_list.next == &sVectors[i].handler_list
|
||||||
@@ -78,10 +79,21 @@ dump_int_statistics(int argc, char **argv)
|
|||||||
|
|
||||||
for (io = sVectors[i].handler_list.next;
|
for (io = sVectors[i].handler_list.next;
|
||||||
io != &sVectors[i].handler_list; io = io->next) {
|
io != &sVectors[i].handler_list; io = io->next) {
|
||||||
kprintf("\t%p", io->func);
|
const char *symbol, *imageName;
|
||||||
|
bool exactMatch;
|
||||||
|
addr_t address, baseAddress;
|
||||||
|
|
||||||
|
status_t error = elf_debug_lookup_symbol_address((addr_t)io->func,
|
||||||
|
&baseAddress, &symbol, &imageName, &exactMatch);
|
||||||
|
if (error == B_OK && exactMatch) {
|
||||||
|
if (strchr(imageName, '/') != NULL)
|
||||||
|
imageName = strrchr(imageName, '/') + 1;
|
||||||
|
|
||||||
|
kprintf("\t%s:%s (%p), data %p\n", imageName, symbol, io->func,
|
||||||
|
io->data);
|
||||||
|
} else
|
||||||
|
kprintf("\t%p, data %p\n", io->func, io->data);
|
||||||
}
|
}
|
||||||
if (sVectors[i].handler_list.next != &sVectors[i].handler_list)
|
|
||||||
kprintf("\n");
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -258,7 +270,7 @@ status_t
|
|||||||
install_io_interrupt_handler(long vector, interrupt_handler handler, void *data,
|
install_io_interrupt_handler(long vector, interrupt_handler handler, void *data,
|
||||||
ulong flags)
|
ulong flags)
|
||||||
{
|
{
|
||||||
struct io_handler *io = NULL;
|
struct io_handler *io = NULL;
|
||||||
cpu_status state;
|
cpu_status state;
|
||||||
|
|
||||||
if (vector < 0 || vector >= NUM_IO_VECTORS)
|
if (vector < 0 || vector >= NUM_IO_VECTORS)
|
||||||
@@ -312,7 +324,7 @@ status_t
|
|||||||
remove_io_interrupt_handler(long vector, interrupt_handler handler, void *data)
|
remove_io_interrupt_handler(long vector, interrupt_handler handler, void *data)
|
||||||
{
|
{
|
||||||
status_t status = B_BAD_VALUE;
|
status_t status = B_BAD_VALUE;
|
||||||
struct io_handler *io = NULL;
|
struct io_handler *io = NULL;
|
||||||
cpu_status state;
|
cpu_status state;
|
||||||
|
|
||||||
if (vector < 0 || vector >= NUM_IO_VECTORS)
|
if (vector < 0 || vector >= NUM_IO_VECTORS)
|
||||||
@@ -350,5 +362,5 @@ remove_io_interrupt_handler(long vector, interrupt_handler handler, void *data)
|
|||||||
free(io);
|
free(io);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user