英文:
How can I print the Irq handler function name from idt table?
问题
I managed to print my IDT Table with my kernel module. It will show me the irq number, Stub Address, Segment, DPL, Type, and Handler Name. But unfortunately, my handler name always return the stub of the address not the actual handlers name.
For example, for irq number 34 it will return
34 0xffffffffa6600180 10 0 Interrupt gate irq_entries_start+0x10/0x660
I believe irq number 34 is for handling nvme irq, as I look it up on proc/interrupts
. But it wont return like nvme_irq or nvme_irq_handler or something like that show me the irq_handler function. How I can show the actual handler name of the idt table using the address?
If you interested to look my github source code for checking the idt table, here is the GitHub link: GitHub Check IDT Repo.
Thank you in advance
英文:
For background, I managed to print my IDT Table with my kernel module. It will show me the irq number, Stub Address, Segment, DPL, Type, and Handler Name. But unfortunately, my handler name always return the stub of the address not the actual handlers name.
For example, for irq number 34 it will return
34 0xffffffffa6600180 10 0 Interrupt gate irq_entries_start+0x10/0x660
I believe irq number 34 is for handling nvme irq, as I look it up on proc/interrupts
. But it wont return like nvme_irq or nvme_irq_handler or something like that show me the irq_handler function. How I can show the actual handler name of the idt table using the address?
If you interested to look my github source code for checking the idt table, here is the GitHub link: GitHub Check IDT Repo.
Thank you in advance
答案1
得分: 1
我已经找到了一种打印它的方法,通过使用irq_to_desc()
函数。它将返回中断描述符,然后我获取action->handler
地址。然后,我调用sprint_symbol
函数传入该地址,它将返回其处理程序名称。谢谢大家。
英文:
I already found a way to print it, by using irq_to_desc()
function. It will return the irq desc and then I get the action->handler
address. Then, I call sprint_symbol on the address, which returns its handler name. Thank you all.
答案2
得分: 0
尝试使用 char *name = symbol_lookup(address);
以获取函数名称,而不是使用 sprint_symbol
。
英文:
Try using char *name = symbol_lookup(address);
to obtain the name of the function instead of sprint_symbol
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论