From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264454AbUBIAJH (ORCPT ); Sun, 8 Feb 2004 19:09:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264477AbUBIAJH (ORCPT ); Sun, 8 Feb 2004 19:09:07 -0500 Received: from slask.tomt.net ([217.8.136.223]:15750 "EHLO pelle.tomt.net") by vger.kernel.org with ESMTP id S264454AbUBIAI7 (ORCPT ); Sun, 8 Feb 2004 19:08:59 -0500 Message-ID: <4026CF98.5000905@tomt.net> Date: Mon, 09 Feb 2004 01:08:56 +0100 From: Andre Tomt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bartlomiej Zolnierkiewicz Cc: linux-kernel@vger.kernel.org Subject: Re: Linux 2.6.3-rc1 References: <200402082234.22043.bzolnier@elka.pw.edu.pl> <4026B064.5080900@tomt.net> <200402082351.48958.bzolnier@elka.pw.edu.pl> In-Reply-To: <200402082351.48958.bzolnier@elka.pw.edu.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 : mov 0x4(%esp,1),%ecx 0xe944 : test %ecx,%ecx 0xe946 : je 0xe978 0xe948 : movl $0x0,0x10(%ecx) 0xe94f : movb $0x1,0x4(%ecx) 0xe953 : mov 0x3910,%eax 0xe958 : test %eax,%eax 0xe95a : je 0xe972 0xe95c : mov %eax,%edx 0xe95e : mov 0x10(%eax),%eax 0xe961 : test %eax,%eax 0xe963 : je 0xe96e 0xe965 : mov %eax,%edx 0xe967 : mov 0x10(%eax),%eax 0xe96a : test %eax,%eax 0xe96c : jne 0xe965 0xe96e : mov %ecx,0x10(%edx) 0xe971 : ret 0xe972 : mov %ecx,0x3910 0xe978 : ret End of assembler dump.