From owner-kgdb@oss.sgi.com Fri Oct 27 09:31:31 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 09:31:11 -0700 Received: from magic.adaptec.com ([208.236.45.80]:15856 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 09:30:55 -0700 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA23403 for ; Fri, 27 Oct 2000 09:30:48 -0700 (PDT) Received: from kraken.ntc.adaptec.com (kraken.ntc.adaptec.com [162.62.136.7]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA12659 for ; Fri, 27 Oct 2000 09:30:47 -0700 (PDT) Received: from ntcexc02.ntc.adaptec.com ([162.62.131.13]) by kraken.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id TH8MAXCF; Fri, 27 Oct 2000 12:31:18 -0400 Received: from ntc.adaptec.com (enomem.ntc.adaptec.com [162.62.130.98]) by ntcexc02.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id VFQ82CBL; Fri, 27 Oct 2000 12:22:51 -0400 Message-ID: <39F9AE39.338BB421@ntc.adaptec.com> Date: Fri, 27 Oct 2000 12:32:57 -0400 From: Brian Boerner Reply-To: brian_boerner@ntc.adaptec.com Organization: Adaptec, Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-21.4smp i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: kgdb and modules Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing I'm using kgdb and want to debug a module that's causing an oops. I load up the symbol table for the kernel with gdb -s, but want to know if it's possible to load the symbol table for the module as well. It seems gdb wants to discard the symbol table for the kernel if you try and load the symbol table for the module. I'm sure people have debugged modules this way before and I'm just missing something. I need to load the symbol table for the mod so I can break on the offending function. -bmb- From owner-kgdb@oss.sgi.com Fri Oct 27 10:24:03 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 10:23:53 -0700 Received: from relay.hq.tis.com ([192.94.214.100]:28804 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 10:23:40 -0700 Received: by sentry.gw.tislabs.com; id NAA22499; Fri, 27 Oct 2000 13:26:24 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma022490; Fri, 27 Oct 00 13:26:23 -0400 Received: from dustpuppy.va.tislabs.com (IDENT:root@dustpuppy.va.tislabs.com [192.168.10.114]) by clipper.gw.tislabs.com (8.9.3/8.9.1) with ESMTP id NAA06018; Fri, 27 Oct 2000 13:22:53 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.9.3) with ESMTP id NAA21618; Fri, 27 Oct 2000 13:22:52 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Fri, 27 Oct 2000 13:22:52 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: Brian Boerner cc: kgdb@oss.sgi.com Subject: Re: kgdb and modules In-Reply-To: <39F9AE39.338BB421@ntc.adaptec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing On Fri, 27 Oct 2000, Brian Boerner wrote: > I'm using kgdb and want to debug a module that's causing an oops. >From system: # insmod -m foo.o 2>&1 | grep '\.text\>' >From gdb: (gdb) add-symbol-file ../foo.o 0xc482b050 where 0xc482b050 is the address given for the .text segment by the insmod command. You will want to use gdb version 5 if you want to be able to look at global variables, and of course, compile with -g. Doug -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Fri Oct 27 12:20:54 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 12:20:45 -0700 Received: from magic.adaptec.com ([208.236.45.80]:13713 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 12:20:31 -0700 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id MAA15789; Fri, 27 Oct 2000 12:20:25 -0700 (PDT) Received: from kraken.ntc.adaptec.com (kraken.ntc.adaptec.com [162.62.136.7]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id MAA14776; Fri, 27 Oct 2000 12:20:24 -0700 (PDT) Received: from ntcexc02.ntc.adaptec.com ([162.62.131.13]) by kraken.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id TH8MAXLD; Fri, 27 Oct 2000 15:20:55 -0400 Received: from ntc.adaptec.com (enomem.ntc.adaptec.com [162.62.130.98]) by ntcexc02.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id VFQ82CBN; Fri, 27 Oct 2000 15:12:27 -0400 Message-ID: <39F9D5F9.2D0A05C9@ntc.adaptec.com> Date: Fri, 27 Oct 2000 15:22:33 -0400 From: Brian Boerner Reply-To: brian_boerner@ntc.adaptec.com Organization: Adaptec, Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-21.4smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Douglas Kilpatrick CC: kgdb@oss.sgi.com Subject: Re: kgdb and modules References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing The only time it seems to panic on me is during boot when it loads from the initrd. In fact, that is reliably reproducible. If the system boots and then the user does an insmod, it works fine. Well, at least the few hundred times I tried it and that's good enough for me. Perhaps if I modify the initrd and have the insmod in there do what your doing below, I might be able to keep it up long enough by stepping to set the text segment in gdb. -bmb- Douglas Kilpatrick wrote: > > On Fri, 27 Oct 2000, Brian Boerner wrote: > > > I'm using kgdb and want to debug a module that's causing an oops. > > From system: > > # insmod -m foo.o 2>&1 | grep '\.text\>' > > From gdb: > > (gdb) add-symbol-file ../foo.o 0xc482b050 > > where 0xc482b050 is the address given for the .text segment by the insmod > command. > > You will want to use gdb version 5 if you want to be able to look at > global variables, and of course, compile with -g. > > Doug > -- > dougk@tislabs.com > dkilpatr@nai.com From owner-kgdb@oss.sgi.com Fri Oct 27 12:28:24 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 12:28:04 -0700 Received: from relay.hq.tis.com ([192.94.214.100]:36751 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 12:27:52 -0700 Received: by sentry.gw.tislabs.com; id PAA26499; Fri, 27 Oct 2000 15:30:37 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma026485; Fri, 27 Oct 00 15:30:03 -0400 Received: from dustpuppy.va.tislabs.com (IDENT:root@dustpuppy.va.tislabs.com [192.168.10.114]) by clipper.gw.tislabs.com (8.9.3/8.9.1) with ESMTP id PAA11283; Fri, 27 Oct 2000 15:26:33 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.9.3) with ESMTP id PAA21966; Fri, 27 Oct 2000 15:26:32 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Fri, 27 Oct 2000 15:26:32 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: Brian Boerner cc: kgdb@oss.sgi.com Subject: Re: kgdb and modules In-Reply-To: <39F9D5F9.2D0A05C9@ntc.adaptec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing On Fri, 27 Oct 2000, Brian Boerner wrote: > The only time it seems to panic on me is during boot > when it loads from the initrd. In fact, that is reliably Er, yay. If you can find out where the module is loaded, odds are very (very) good that it will be loaded at the same place every time. So when you attach with the debugger, do the add-symbol-file command then... before the module is actually loaded. Doug -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Fri Oct 27 13:11:25 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 13:11:05 -0700 Received: from montreal.eicon.com ([192.219.17.120]:28169 "EHLO mtl_exchange.eicon.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 13:10:42 -0700 Received: by montreal.eicon.com with Internet Mail Service (5.0.1460.8) id <4ZPPT852>; Fri, 27 Oct 2000 16:13:12 -0400 Message-ID: From: Carlo Pagano To: Douglas Kilpatrick Cc: kgdb@oss.sgi.com Subject: RE: kgdb and modules Date: Fri, 27 Oct 2000 16:13:09 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing Hi, In a related story, I am trying to debug a module. I am using gdbstart -s 4800 -t /dev/ttyS0 rather than the lilo switches. Everything works fine until I try to add-symbol-file: I type in add-symbol-file hcfspkph.o 0xc880a060 It asks me if I want to load the symbol file at text address 0xc880a060 I say yes. It says Reading symbols from hcfspkph.o ...done I am using ddd as a front end to gdb 20001020. The problem is when I try to open a source file (to set a breakpoint), I see all the necessary source files in the window but when I try to open one of the module ones it says: Line 1 of "/x/y/x/file.c" is at address 0xc8843db0 but contains no code. Any help would be appreciated. Carlo From: Douglas Kilpatrick [mailto:dougk@tislabs.com] Sent: Friday, October 27, 2000 1:23 PM To: Brian Boerner Cc: kgdb@oss.sgi.com Subject: Re: kgdb and modules On Fri, 27 Oct 2000, Brian Boerner wrote: > I'm using kgdb and want to debug a module that's causing an oops. >From system: # insmod -m foo.o 2>&1 | grep '\.text\>' >From gdb: (gdb) add-symbol-file ../foo.o 0xc482b050 where 0xc482b050 is the address given for the .text segment by the insmod command. You will want to use gdb version 5 if you want to be able to look at global variables, and of course, compile with -g. Doug -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Fri Oct 27 14:51:15 2000 Received: by oss.sgi.com id ; Fri, 27 Oct 2000 14:50:56 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:23604 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 27 Oct 2000 14:50:45 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id OAA02267 for ; Fri, 27 Oct 2000 14:55:04 -0700 (PDT) mail_from (sfoehner@illini.engr.sgi.com) Received: from illini.engr.sgi.com (illini.engr.sgi.com [163.154.5.81]) by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id OAA85694 for <@cthulhu.engr.sgi.com:kgdb@oss.sgi.com>; Fri, 27 Oct 2000 14:47:21 -0700 (PDT) mail_from (sfoehner@illini.engr.sgi.com) Received: (from sfoehner@localhost) by illini.engr.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) id OAA79781 for kgdb@oss.sgi.com; Fri, 27 Oct 2000 14:47:11 -0700 (PDT) Date: Fri, 27 Oct 2000 14:47:11 -0700 (PDT) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10010271447.ZM1175740@illini.engr.sgi.com> X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com Subject: 2.2.x kgdb patch now up to 2.2.16 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing I ported the 2.2 series of the kgdb patch up to 2.2.16. There are no significant changes. I just made sure there is a patch that applies cleanly to 2.2.16. Let me know if you encounter any problems. http://oss.sgi.com/projects/kgdb/ Scott -- Scott Foehner SGI sfoehner@engr.sgi.com Computer Systems Business Unit 650-933-3473 Core OS From owner-kgdb@oss.sgi.com Tue Oct 31 09:22:50 2000 Received: by oss.sgi.com id ; Tue, 31 Oct 2000 09:22:30 -0800 Received: from magic.adaptec.com ([208.236.45.80]:59043 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Tue, 31 Oct 2000 09:22:18 -0800 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA06182 for ; Tue, 31 Oct 2000 09:22:13 -0800 (PST) Received: from kraken.ntc.adaptec.com (kraken.ntc.adaptec.com [162.62.136.7]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA23928 for ; Tue, 31 Oct 2000 09:22:11 -0800 (PST) Received: from ntcexc02.ntc.adaptec.com ([162.62.131.13]) by kraken.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id TH8MA5RM; Tue, 31 Oct 2000 12:22:43 -0500 Received: from ntc.adaptec.com (enomem.ntc.adaptec.com [162.62.130.98]) by ntcexc02.ntc.adaptec.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id VFQ82CBR; Tue, 31 Oct 2000 12:14:06 -0500 Message-ID: <39FF0035.AA2E32DB@ntc.adaptec.com> Date: Tue, 31 Oct 2000 12:24:05 -0500 From: Brian Boerner Reply-To: brian_boerner@ntc.adaptec.com Organization: Adaptec, Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-21.4smp i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: kgdb not stopping Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing I've compiled the kernel with kgdb support and cross all the t's and dot all the i's, but it simply does not stop. I've got a similar setup on another 2.2.16 kernel and it works fine. Has anyone had any problems getting kgdb to stop where it is suppose to? -bmb-