From owner-kgdb@oss.sgi.com Mon Apr 3 15:07:16 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 15:07:06 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:28452 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 15:06:49 -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 PAA08716 for ; Mon, 3 Apr 2000 15:10:33 -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 PAA85532; Mon, 3 Apr 2000 15:06:31 -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 PAA43118; Mon, 3 Apr 2000 15:05:49 -0700 (PDT) Date: Mon, 3 Apr 2000 15:05:49 -0700 (PDT) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10004031505.ZM42976@illini.engr.sgi.com> In-Reply-To: Douglas Kilpatrick "kgdb and 2.2.14-5 from RH 6-2." (Mar 31, 7:42pm) References: X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: Douglas Kilpatrick Subject: Re: kgdb and 2.2.14-5 from RH 6-2. Cc: kgdb@oss.sgi.com 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 Doug, The early connect changes I made to kgdb were accepted by the maintainer of the kgdb patch. Thus, instead of maintaining a separate patch, I now just point people to his patch. However, he is now only working on 2.3 versions of the patch. You can check his stuff out at ftp://www.gcom.com/pub/linux/src/kgdb-2.3.35 That patch is also available from the kgdb project site on oss.sgi.com. You can check out http://oss.sgi.com/projects/kgdb/news.html for more details. Most of that info was probably not useful to you, though, since it looks like you need to be working with 2.2.14. I don't really have plans to advance a 2.2.x series of the patch, but if you were to send me one with the fixes/ additions you noted, I could put it up on the web site. I don't quite understand why you want to be able to drop into the debugger when doing a sysrq on the machine you are debugging. If you just send the break character from the machine running gdb, it will drop into the debugger. I think this is the preferred way, because that way you don't have to mess with the machine running the kernel you are debugging. I'm not sure why you are seeing the oops. Are you using kdb as well? If you add kdb, you might be able to debug the problem. If you have more details on why the kernel is panicing, let me know. Scott On Mar 31, 7:42pm, Douglas Kilpatrick wrote: > Subject: kgdb and 2.2.14-5 from RH 6-2. > > First the easy stuff: > > init/main.c: > > The patch reads: > > + if (!strcmp(line,"gdbttyS=")) { > + gdb_ttyS = simple_strtoul(line+8,NULL,10); > + continue; > + } > + if (!strcmp(line,"gdbbaud=")) { > + gdb_baud = simple_strtoul(line+8,NULL,10); > + continue; > + } > > Those are, of course, supposed to be: > if (!strncmp(line,"gdbttyS=",8)) { > > Also, since going into the debugger at any arbitrary point is usefull > I added a few lines to sysrq.c. Sorry this isn't in patch format but > I'm trying to do module development not kernel development and so don't > have a clean copy of kernel source to diff. > > Anyway, at line 31, after the CONFIG_APM section: > > #ifdef CONFIG_GDB > extern int gdb_hook(void); > #endif > > and at line 141, after the case 'l' section: > > #ifdef CONFIG_GDB > case 'g': > gdb_hook(); > break; > #endif > > Now for the more fundamental issue: > > Attaching to the debugger appears to work, but as soon as I continue from > gdb, the system Oops', then panics and locks. Things never get sent back > into gdb, and it crashes too quickly for syslog to write out the oops message > so I don't know what the stack looks like yet. > > This happens if I attach at boot or via sysctl, so I'm pretty sure its not > something I've done. If it matters, I can provide my .config, but basically > its a RH6.2 stock (as if) kernel with SCSI/sound/RAID/stuff I don't need > removed, and the kgdb0.2-2.2.12 patch applied. (Minus the root-level makefile > changes that somehow made it into the RH 2.2.14 kernel) > > > Any ideas? Anyone seen this before? > > Doug > -- > dougk@tislabs.com > dkilpatr@nai.com > Will crash Linux for food. >-- End of excerpt from Douglas Kilpatrick -- Scott Foehner SGI sfoehner@engr.sgi.com Computer Systems Business Unit 650-933-3473 Core OS From owner-kgdb@oss.sgi.com Mon Apr 3 15:27:37 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 15:27:27 -0700 Received: from sentry.gw.tislabs.com ([192.94.214.100]:58571 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 15:27:04 -0700 Received: by sentry.gw.tislabs.com; id SAA15507; Mon, 3 Apr 2000 18:28:40 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma015503; Mon, 3 Apr 00 18:28:08 -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 SAA25837; Mon, 3 Apr 2000 18:24:53 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.8.7) with ESMTP id SAA18530; Mon, 3 Apr 2000 18:30:19 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Mon, 3 Apr 2000 18:30:19 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: Scott Foehner cc: kgdb@oss.sgi.com Subject: Re: kgdb and 2.2.14-5 from RH 6-2. In-Reply-To: <10004031505.ZM42976@illini.engr.sgi.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 Mon, 3 Apr 2000, Scott Foehner wrote: > Most of that info was probably not useful to you, though, since it looks like > you need to be working with 2.2.14. I don't really have plans to advance a > 2.2.x series of the patch, but if you were to send me one with the fixes/ > additions you noted, I could put it up on the web site. Well, 2.2.X. Right now X is 14 due to RH6.2... > I don't quite understand why you want to be able to drop into the debugger > when doing a sysrq on the machine you are debugging. If you just send the Cause I sometimes want to be able to reboot the slave machine without intervention (ie, power outage) and then decide that I will be debugging this session w/o rebooting it. > break character from the machine running gdb, it will drop into the debugger. > I think this is the preferred way, because that way you don't have to mess > with the machine running the kernel you are debugging. Oh, I'm doing kernel-modules, not kernel hacking. I don't care what kernel the machine is running... And I want to attach the debugger after boot, not break. Basically I was just trying to replace the "gdbstub" program that no longer comes with the patch. > I'm not sure why you are seeing the oops. Are you using kdb as well? If you > add kdb, you might be able to debug the problem. If you have more details on > why the kernel is panicing, let me know. I don't think so, unless RH6.2 includes it. I just dropped the patch into a stock 6.2 /usr/src/linux tree, and compilied. I tried again with rc5des running, and it didn't crash... Now I'm really confused. I don't yet know if it will work well enough for my needs as is, but making sure that something other than the idle task is running seems to have fixed the immediate crash. I'll look into what patches RH6.2 comes with... Doug -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Mon Apr 3 15:41:27 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 15:41:17 -0700 Received: from sentry.gw.tislabs.com ([192.94.214.100]:7372 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 15:41:05 -0700 Received: by sentry.gw.tislabs.com; id SAA15608; Mon, 3 Apr 2000 18:42:40 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma015600; Mon, 3 Apr 00 18:42:10 -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 SAA26082; Mon, 3 Apr 2000 18:38:55 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.8.7) with ESMTP id SAA18750; Mon, 3 Apr 2000 18:44:19 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Mon, 3 Apr 2000 18:44:19 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: Scott Foehner cc: kgdb@oss.sgi.com Subject: Re: kgdb and 2.2.14-5 from RH 6-2. In-Reply-To: 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 Mon, 3 Apr 2000, Douglas Kilpatrick wrote: > I'll look into what patches RH6.2 comes with... Source and Patch list below .sig. I don't see any other debugging patch... But at this point, RedHat has pretty clearly forked the kernel in everything but name. $ wc -l *.patch | tail -1 110589 total $ grep '^+' *.patch | wc -l 66728 Doug -- dougk@tislabs.com dkilpatr@nai.com Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.2/linux-2.2.14.tar.gz Source1: ftp://sourceforge.org/pcmcia/pcmcia-cs-%{pcmciaver}.tar.gz Source2: ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/ibcs-%{ibcsver}.tar.gz Source4: README.kernel-sources Source5: ftp://ftp.ocs.com.au/pub/ksymoops/ksymoops-%{ksymoopsver}.tar.gz Source10: pcmcia-cs-2.8.8-network.script Source11: module-info Source12: installkernel Source13: rhkmvtag.c Source14: kernel-2.2-BuildASM.sh Source15: linux-autoconf.h Source16: linux-version.h Source17: linux-modversions.h Source20: kernel-%{kversion}-i386.config Source21: kernel-%{kversion}-i386-smp.config Source22: kernel-%{kversion}-i386-BOOT.config Source23: kernel-%{kversion}-alpha.config Source24: kernel-%{kversion}-alpha-smp.config Source25: kernel-%{kversion}-sparc.config Source26: kernel-%{kversion}-sparc-smp.config Source27: kernel-%{kversion}-sparc64.config Source28: kernel-%{kversion}-sparc64-smp.config Source29: kernel-%{kversion}-i686.config Source30: kernel-%{kversion}-i686-smp.config Source31: kernel-%{kversion}-alpha-BOOT.config Source32: kernel-%{kversion}-sparc-BOOT.config Source33: kernel-%{kversion}-sparc64-BOOT.config Source34: kernel-%{kversion}-i586.config Source35: kernel-%{kversion}-i586-smp.config Patch11: raw-2.2.13-rh61.diff Patch12: linux-2.2.12-peerbus.patch Patch13: linux-2.2.12-symversion.patch Patch14: raid-2.2.14-B1.gz Patch15: linux-2.2.12-cpq-mdh.patch Patch16: linux-2.2.12-limits.patch Patch17: linux-2.2.12-3c90x.patch Patch18: linux-2.2.13-alphamsnd.patch Patch19: linux-2.2.14-sparc-config.patch Patch20: linux-2.2.13-smart2-1.0.6.patch Patch21: linux-2.2.14-lfs-headers.patch Patch22: linux-2.2.14-lfs.patch Patch23: linux-2.2.12-PIII.patch Patch24: linux-2.2.12-PIII-xor.patch Patch25: linux-2.2.13-IOAPIC.patch Patch26: linux-2.2.14-alpha-ramdisk.patch Patch27: linux-2.2.14-sigio.patch Patch28: linux-2.2.14-joyfix.patch Patch29: linux-2.2.14-nobfddep.patch Patch30: linux-2.2.14-iobuffix.patch Patch31: linux-2.2.14-sunpartshaddap.patch Patch32: linux-2.2.14-nfsattack2.patch Patch33: linux-2.2.14-sparc-nfs.patch Patch34: linux-2.2.14-fb-modules.patch Patch35: linux-2.2.14-moremaestro.patch Patch36: linux-2.2.14-timersync.patch Patch37: linux-2.2.14-MegaRAID.patch Patch38: linux-2.2.13-aic7xxx-5.1.22.patch Patch39: linux-2.2.13-aic7xxx-5.1.23.patch Patch40: linux-2.2.13-aic7xxx-5.1.24.patch Patch41: linux-2.2.13-aic7xxx-5.1.25.patch Patch42: linux-2.2.14-blkdev.patch Patch43: linux-2.2.14-alpha-exception.patch Patch44: linux-2.2.14-82596-crash.patch Patch45: linux-2.2.14-cyclades-smp.patch Patch46: linux-2.2.14-duh.patch Patch47: linux-2.2.14-eepro100.patch Patch48: linux-2.2.14-elf-loader.patch Patch49: linux-2.2.14-i386-asm.patch Patch50: linux-2.2.14-ide-probe.patch Patch51: linux-2.2.14-lucent-hang.patch Patch52: linux-2.2.14-mediaGX.patch Patch53: linux-2.2.14-msdos-fixup.patch Patch54: linux-2.2.14-nfs-fix.patch Patch55: linux-2.2.14-oom-hang.patch Patch56: linux-2.2.14-plip-fix.patch Patch57: linux-2.2.14-rpc.patch Patch58: linux-2.2.14-scsi-blacklist.patch Patch59: linux-2.2.14-shmem-overwrite.patch Patch60: linux-2.2.14-sigkill.patch Patch61: linux-2.2.14-sound-update.patch Patch62: linux-2.2.14-bonding.patch Patch63: linux-2.2.14-network-fixes.patch Patch64: linux-2.2.14-sparc-fixes.patch Patch65: linux-2.2.14-megaraid.patch Patch66: linux-2.2.14-loop.patch Patch67: linux-2.2.13-aic7xxx-5.1.26.patch Patch68: linux-2.2.14-acenic041.patch Patch69: linux-2.2.14-ide-cd-shutup.patch Patch70: linux-2.2.13-bigmem-no-lfs.patch Patch71: linux-2.2.13-bigmem.patch Patch72: linux-2.2.13-bigmem-dcache.patch Patch73: linux-2.2.12-bigmem-raw.patch Patch74: linux-2.2.12-bigmem-initrd.patch Patch75: linux-2.2.14-security-a1.patch Patch76: linux-2.2.14-security-a2.patch Patch77: linux-2.2.14-security-a3.patch Patch78: linux-2.2.14-security-a4.patch Patch79: linux-2.2.14-sparcacenic.patch Patch80: linux-2.2.14-newagpdist.patch Patch81: linux-2.2.14-agphjlfixes.patch Patch82: linux-2.2.14-emu10k1.patch Patch83: linux-2.2.14-eepropre7.patch Patch84: linux-2.2.14-psi-update.patch Patch85: linux-2.2.14-sparc-syscall.patch Patch86: linux-2.2.14-sk98-fix.patch Patch87: linux-2.2.13-aic7xxx-5.1.27.patch Patch88: linux-2.2.14-sparc-lockd.patch Patch89: linux-2.2.14-sparc-mmap.patch Patch90: linux-2.2.14-sparc-raid.patch Patch91: linux-2.2.14-aic7xxx-5.1.28.patch Patch92: linux-2.2.14-sparc-cpu-bug.patch Patch93: linux-2.2.14-nautilus-srm.patch Patch94: linux-2.2.14-scsi-devs.patch Patch95: linux-2.2.14-sunqe.patch Patch96: linux-2.2.14-sparcswift.patch Patch97: linux-2.2.14-sparc-cpu-bug2.patch Patch98: linux-2.2.14-alphasym.patch Patch99: linux-2.2.14-sparc-cpu-bug3.patch Patch100: ibcs-2.1-rh.patch Patch101: ibcs-2.1-locking.patch Patch102: pcmcia-cs-%{pcmciaver}-script.patch Patch103: pcmcia-cs-3.1.4-xircom.patch Patch104: pcmcia-cs-3.1.3-3com.patch Patch105: pcmcia-cs-%{pcmciaver}-config.patch Patch200: ipvs-0.9.7-2.2.13.patch Patch201: linux-2.2.12-ipvsfix.patch Patch202: linux-2.2.14-ipvs-template.patch From owner-kgdb@oss.sgi.com Tue Apr 4 19:31:19 2000 Received: by oss.sgi.com id ; Tue, 4 Apr 2000 19:31:00 -0700 Received: from [202.109.78.116] ([202.109.78.116]:47631 "EHLO ms.lawton.com.cn") by oss.sgi.com with ESMTP id ; Tue, 4 Apr 2000 19:30:37 -0700 Received: from bear ([202.109.13.22]) by ms.lawton.com.cn (8.8.8/8.8.8) with SMTP id KAA42185 for ; Wed, 5 Apr 2000 10:23:57 +0800 (CST) (envelope-from bear@ms.lawton.com.cn) Message-ID: <007301bf9ea6$eafd6ce0$fd01a8c0@bear.R&D> From: "bear" To: Subject: Date: Wed, 5 Apr 2000 10:30:25 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001E_01BF9EE9.F47155A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing This is a multi-part message in MIME format. ------=_NextPart_000_001E_01BF9EE9.F47155A0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable I'm a newer to kernel debugging, and when I try to debug kernel between = two pentium box=20 running linux, I failed.=20 I have patched kgdb0.2-2.2.12 to my Linux kernel 2.2.12-20, and when I = restarted this kernel just like you say the kernel stop with message "waiting for = remote connect to debug....".=20 Then I connected to my kernel by typing "target remote /dev/ttyS0(1)" in = another machine's=20 gdb,but nothing have happened.=20 What's wrong with me? I'm greatly appreciative to you, thanks! =20 bear Shanghai China. ------=_NextPart_000_001E_01BF9EE9.F47155A0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
I'm a newer to kernel debugging, and when I try to = debug=20 kernel between two pentium box
running linux, I failed.
I have patched kgdb0.2-2.2.12 to my Linux kernel = 2.2.12-20,=20 and when I restarted this
 kernel just like you say the kernel stop with = message=20 "waiting for remote connect to debug....".
Then I connected to my = kernel by typing=20 "target remote /dev/ttyS0(1)" in another machine's =
gdb,but nothing have happened.
What's wrong with me? = I'm greatly=20 appreciative to you, thanks!
 
          &nbs= p;            = ;    =20 bear
          &nbs= p;            = ;        =20 Shanghai China.
------=_NextPart_000_001E_01BF9EE9.F47155A0-- From owner-kgdb@oss.sgi.com Fri Apr 7 15:07:39 2000 Received: by oss.sgi.com id ; Fri, 7 Apr 2000 15:07:28 -0700 Received: from mailgate.tpi.com ([198.107.51.136]:51469 "EHLO mailgate.tpi.com") by oss.sgi.com with ESMTP id ; Fri, 7 Apr 2000 15:07:10 -0700 Received: from linux.tpi.com ([198.107.51.142]) by mailgate.tpi.com (Post.Office MTA v3.5.3 release 223 ID# 0-60229U100L100S0V35) with ESMTP id com for ; Fri, 7 Apr 2000 15:06:50 -0700 Received: from localhost (timg@localhost) by linux.tpi.com (8.8.7/8.8.7) with SMTP id PAA23607 for ; Fri, 7 Apr 2000 15:07:28 -0700 Date: Fri, 7 Apr 2000 15:07:28 -0700 (PDT) From: Tim Gardner To: kgdb@oss.sgi.com Subject: Boot time attach 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 What's the secret to attaching at boot time? I'm using ddd as the gdb frontend. I've set the baud rate, the serial device, etc. When I set 'Debugging of remote protocol' I can see serial traffic with acknowledgements. So, I think I have the physical stuff working. It must be obvious by now that I'm not (yet) a gdb expert. I've tried run, attach, etc. No joy. Any help would be appreciated. Maybe this is something that should be added to the FAQ. I see from the April00 archive that this is not the first time this question has been asked. rtg ------------------------------- Tim Gardner - TriplePoint, Inc. timg@tpi.com www.tpi.com From owner-kgdb@oss.sgi.com Fri Apr 7 15:16:28 2000 Received: by oss.sgi.com id ; Fri, 7 Apr 2000 15:16:08 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:57609 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 7 Apr 2000 15:15:56 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id PAA14862 for ; Fri, 7 Apr 2000 15:11:14 -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 PAA51739 for <@cthulhu.engr.sgi.com:kgdb@oss.sgi.com>; Fri, 7 Apr 2000 15:15:38 -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 PAA81965 for kgdb@oss.sgi.com; Fri, 7 Apr 2000 15:15:18 -0700 (PDT) Date: Fri, 7 Apr 2000 15:15:18 -0700 (PDT) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10004071515.ZM83317@illini.engr.sgi.com> In-Reply-To: Tim Gardner "Boot time attach" (Apr 7, 3:07pm) References: X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com Subject: Re: Boot time attach 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 Tim, Are you asking the gdb command to necessary to connect across a serial line? If so, the answer is "target". You are right in that I only documented the kernel side of things, and not what needed to be done on gdb. I will add that to the FAQ. Are you using a 2.2 series kernel, or 2.3? I believe the 2.3 patch has some documentation of this nature. I have this in my .gdbinit: define rmt set remotebaud 38400 target remote /dev/ttyd2 end Basically, you need to do the "set remotebaud ", and then "target remote ". Let me know if you still have problems. Scott On Apr 7, 3:07pm, Tim Gardner wrote: > Subject: Boot time attach > What's the secret to attaching at boot time? I'm using ddd as the gdb > frontend. I've set the baud rate, the serial device, etc. When I set > 'Debugging of remote protocol' I can see serial traffic with > acknowledgements. So, I think I have the physical stuff working. It must > be obvious by now that I'm not (yet) a gdb expert. I've tried run, attach, > etc. No joy. Any help would be appreciated. Maybe this is something that > should be added to the FAQ. I see from the April00 archive that this is > not the first time this question has been asked. -- Scott Foehner SGI sfoehner@engr.sgi.com Computer Systems Business Unit 650-933-3473 Core OS From owner-kgdb@oss.sgi.com Fri Apr 7 15:40:28 2000 Received: by oss.sgi.com id ; Fri, 7 Apr 2000 15:40:09 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:47630 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 7 Apr 2000 15:39:39 -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 PAA00956 for ; Fri, 7 Apr 2000 15:43:28 -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 PAA81602; Fri, 7 Apr 2000 15:39:20 -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 PAA74551; Fri, 7 Apr 2000 15:38:44 -0700 (PDT) Date: Fri, 7 Apr 2000 15:38:44 -0700 (PDT) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10004071538.ZM80669@illini.engr.sgi.com> In-Reply-To: Douglas Kilpatrick "Re: kgdb and 2.2.14-5 from RH 6-2." (Apr 7, 6:28pm) References: X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com, Douglas Kilpatrick Subject: Re: kgdb and 2.2.14-5 from RH 6-2. 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've gotten in a bad habit of taking email conversations to personal email rather than keeping them on the list. The bad part about that is that questions that are answered are not in the archive unless I reply to the whole list. So, I am henceforth going to send all replies to the kgdb mailing list unless we deviate away from kgdb topics. On Apr 7, 6:28pm, Douglas Kilpatrick wrote: > Well, I've done enough debugging by now that I'm pretty happy with my > patch... > > Is it ever going to make it up to the ftp site? I'm working on another project right now that I am almost finished with. Look for it early next week. > Second question: > > For some reason, I can't see global variables. Any idea how to fix? You can't see globals? Those should be the easiest to get at. Can you give me an example of a global you're trying to see, but can't? Scott -- Scott Foehner SGI sfoehner@engr.sgi.com Computer Systems Business Unit 650-933-3473 Core OS From owner-kgdb@oss.sgi.com Fri Apr 7 15:56:09 2000 Received: by oss.sgi.com id ; Fri, 7 Apr 2000 15:55:59 -0700 Received: from sentry.gw.tislabs.com ([192.94.214.100]:49338 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Fri, 7 Apr 2000 15:55:37 -0700 Received: by sentry.gw.tislabs.com; id SAA10673; Fri, 7 Apr 2000 18:57:15 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma010666; Fri, 7 Apr 00 18:56:18 -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 SAA11575; Fri, 7 Apr 2000 18:52:27 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.8.7) with ESMTP id SAA13702; Fri, 7 Apr 2000 18:58:06 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Fri, 7 Apr 2000 18:58:06 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: Scott Foehner cc: kgdb@oss.sgi.com Subject: Re: kgdb and 2.2.14-5 from RH 6-2. In-Reply-To: <10004071538.ZM80669@illini.engr.sgi.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, 7 Apr 2000, Scott Foehner wrote: > > Second question: > > > > For some reason, I can't see global variables. Any idea how to fix? > > You can't see globals? Those should be the easiest to get at. Can you > give me an example of a global you're trying to see, but can't? (gdb) add-symbol-file ../wss.o 0xc482f050 add symbol table from file "../wss.o" at text_addr = 0xc482f050? (y or n) y (gdb) break wss_evspace_resolve Breakpoint 1 at 0xc483548c: file wss_evspace.c, line 206. (gdb) c Continuing. Breakpoint 1, wss_evspace_resolve (name=0xc26e4ccd "file_accesses") at wss_evspace.c:206 206 int retval = find_space(name); (gdb) list 201 int EXPORT 202 wss_evspace_resolve(wss_char_t *name) 203 { 204 static int counter = 0; 205 206 int retval = find_space(name); 207 208 if (retval < 0) { 209 WSI_MUTEX_ENTER(wss_evspace); 210 retval = ++counter; (gdb) n 208 if (retval < 0) { (gdb) 210 retval = ++counter; (gdb) 212 add_space(name, retval); (gdb) print retval $6 = 2 (gdb) print counter $7 = 1459617803 I can see globals of the kernel, its globals of a module that I can not see. In this case I think I'm getting a different global than I thought I was getting. In other cases I get "No symbol 'foo' in current context." Doug -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Fri Apr 7 16:31:20 2000 Received: by oss.sgi.com id ; Fri, 7 Apr 2000 16:31:02 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:54304 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 7 Apr 2000 16:30:35 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id QAA25841 for ; Fri, 7 Apr 2000 16:25:53 -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 QAA59579; Fri, 7 Apr 2000 16:30:17 -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 QAA76842; Fri, 7 Apr 2000 16:29:36 -0700 (PDT) Date: Fri, 7 Apr 2000 16:29:36 -0700 (PDT) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10004071629.ZM83752@illini.engr.sgi.com> In-Reply-To: Douglas Kilpatrick "Re: kgdb and 2.2.14-5 from RH 6-2." (Apr 7, 6:58pm) References: X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: Douglas Kilpatrick Subject: kgdb & modules (was Re: kgdb and 2.2.14-5 from RH 6-2.) Cc: kgdb@oss.sgi.com 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 Apr 7, 6:58pm, Douglas Kilpatrick wrote: > I can see globals of the kernel, its globals of a module that I can not > see. In this case I think I'm getting a different global than I thought > I was getting. In other cases I get "No symbol 'foo' in current context." Ah, you're working with modules. I am not an expert here, but I believe changes are necessary to both kgdb and to gdb in order to see all module symbols correctly. Those changes are in the latest 2.3 version of kgdb, I think. Amit Kale had a patch that worked on gdb, but I don't know if it was ever included in the gdb source. I will include some excerpts from emails that were exchanged on this subject: Mail 1: Date: Wed, 12 Jan 2000 10:36:20 -0600 From: David Grothe Reply-To: dave@gcom.com "Amit S. Kale" wrote: > 2. If you find module address and give it to gdb, gdb takes it as start of text > segment and may or may not calculate addresses in data and bss segments > correctly while doint relocating symbols. A workaround for this is to do > relocations using ld and tell gdb not to do relocations. gdb needs to be > patched for this. I just ran into this same problem. I am glad that you have found it and fixed it. I will integrate your fixes. If we need to patch gdb itself I think that I will place a copy of the patched gdb on our FTP site in the same directory as kgdb to make it easy for users. Any chance that your changes will make it into a future "official" version of gdb? Mail 2 (similar parts deleted as in previous mail): From: "Amit S. Kale" Organization: Veritas Software (India) To: David Grothe Subject: Re: kgdb-2.3.38 [ Re: kgdb-2.3.35 ] Date: Fri, 14 Jan 2000 11:28:53 +0530 Cc: Scott Foehner , Andrea Arcangeli Hi, On Wed, 12 Jan 2000, David Grothe wrote: > [snip] > Any chance that your changes will make it into a future "official" version of gdb? I wanted to make a patch for current snapshot of gdb. But it already includes different semantics for add-symbol-file at address -1. I'll look into this problem make a patch for current snapshot of gdb. I'll inform you when I post a patch to gdb-patches mailing list. -------------- Unfortunately, I can't be of much more help than that. I believe it is possible to do kgdb debugging on modules in 2.3. I don't know about 2.2, though. You might want to ask Amit Kale, who seems to be a gdb expert, or David Grothe, who is the maintainer of the kgdb patch, what the status of debugging modules with kgdb is. Scott -- Scott Foehner SGI sfoehner@engr.sgi.com Computer Systems Business Unit 650-933-3473 Core OS