Re: Linux 2.6.3-rc1

From: Andre Tomt
Date: Sun Feb 08 2004 - 19:11:11 EST


Bartlomiej Zolnierkiewicz wrote:
Can you disassemble ide_pci_register_host_proc using gdb?

I'd need a walkthrough, not very familiar with gdb other than getting a
backtrace out of it


Make sure to enable following options in kernel config:
CONFIG_DEBUG_KERNEL ("Kernel hacking"->"Kernel debugging" ) and
CONFIG_DEBUG_INFO ("Kernel debugging"->"Compile the kernel with debug info").

Recompile kernel.

$ gdb /usr/src/linux/vmlinux
(gdb) disassemble ide_pci_register_host_proc

That's all :-).


Ahh. However, as ide-core is a module in this case, I had to run gdb on the module instead. Anyway..

(gdb) disassemble ide_pci_register_host_proc
Dump of assembler code for function ide_pci_register_host_proc:
0xe940 <ide_pci_register_host_proc>: mov 0x4(%esp,1),%ecx
0xe944 <ide_pci_register_host_proc+4>: test %ecx,%ecx
0xe946 <ide_pci_register_host_proc+6>: je 0xe978 <ide_pci_register_host_proc+56>
0xe948 <ide_pci_register_host_proc+8>: movl $0x0,0x10(%ecx)
0xe94f <ide_pci_register_host_proc+15>: movb $0x1,0x4(%ecx)
0xe953 <ide_pci_register_host_proc+19>: mov 0x3910,%eax
0xe958 <ide_pci_register_host_proc+24>: test %eax,%eax
0xe95a <ide_pci_register_host_proc+26>: je 0xe972 <ide_pci_register_host_proc+50>
0xe95c <ide_pci_register_host_proc+28>: mov %eax,%edx
0xe95e <ide_pci_register_host_proc+30>: mov 0x10(%eax),%eax
0xe961 <ide_pci_register_host_proc+33>: test %eax,%eax
0xe963 <ide_pci_register_host_proc+35>: je 0xe96e <ide_pci_register_host_proc+46>
0xe965 <ide_pci_register_host_proc+37>: mov %eax,%edx
0xe967 <ide_pci_register_host_proc+39>: mov 0x10(%eax),%eax
0xe96a <ide_pci_register_host_proc+42>: test %eax,%eax
0xe96c <ide_pci_register_host_proc+44>: jne 0xe965 <ide_pci_register_host_proc+37>
0xe96e <ide_pci_register_host_proc+46>: mov %ecx,0x10(%edx)
0xe971 <ide_pci_register_host_proc+49>: ret
0xe972 <ide_pci_register_host_proc+50>: mov %ecx,0x3910
0xe978 <ide_pci_register_host_proc+56>: ret
End of assembler dump.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/