From owner-kgdb@oss.sgi.com Tue Jun 13 14:40:42 2000 Received: by oss.sgi.com id ; Tue, 13 Jun 2000 14:40:32 -0700 Received: from mail.missioncriticallinux.com ([208.51.139.18]:25093 "EHLO postal.lowell.mclinux.com") by oss.sgi.com with ESMTP id ; Tue, 13 Jun 2000 14:40:21 -0700 Received: from mclinux.com (IDENT:dai@dai.lowell.mclinux.com [10.1.8.101]) by postal.lowell.mclinux.com (8.9.3/8.9.3) with ESMTP id RAA02585 for ; Tue, 13 Jun 2000 17:39:52 -0400 Message-ID: <3946AB19.D4F1F0DE@mclinux.com> Date: Tue, 13 Jun 2000 17:43:53 -0400 From: Peng Dai Organization: Mission Critical Linux X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.16 i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: kgdb experience and simple fix 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 Hi, I have been trying remote gdb kernel debugging. I found a couple things worth mentioning here. The boot time debug functionality is broken due to option parsing. Also the gdb hook can be invoked earlier (after memory is initialized though). The following is a simple fix, for init/main.c, 399c399 < if (!strcmp(line,"gdbttyS=")) { --- > if (!strncmp(line,"gdbttyS=", 8)) { 403c403 < if (!strcmp(line,"gdbbaud=")) { --- > if (!strncmp(line,"gdbbaud=", 8)) { 516a517,520 > #ifdef CONFIG_X86_REMOTE_DEBUG > if (gdb_enter) > gdb_hook(); /* right at boot time */ > #endif 546,549d549 < #ifdef CONFIG_X86_REMOTE_DEBUG < if (gdb_enter) < gdb_hook(); /* right at boot time */ < #endif I found that I have to set the baudrate to 4800 to have a smooth debugging session. Baud rates higher than this cause characters to be dropped frequently and gdb to hang for seconds each time. Of course my serial hardware does not support flow control, but neither do most other standard PCs. Regards, -- Peng Dai email: dai@mclinux.com Kernel Engineer and Database Specialist voice: (978) 446-9166 x276 Mission Critical Linux fax: (978) 446-9470 100 Foot Of John Street Lowell, MA 01852 http://www.missioncriticallinux.com From owner-kgdb@oss.sgi.com Fri Jun 23 12:30:00 2000 Received: by oss.sgi.com id ; Fri, 23 Jun 2000 12:29:51 -0700 Received: from thalia.fm.intel.com ([132.233.247.11]:62738 "EHLO thalia.fm.intel.com") by oss.sgi.com with ESMTP id ; Fri, 23 Jun 2000 12:29:25 -0700 Received: from SMTP (fmsmsxvs05-1.fm.intel.com [132.233.42.205]) by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.30 2000/06/08 18:25:35 dmccart Exp $) with SMTP id TAA16242 for ; Fri, 23 Jun 2000 19:30:18 GMT Received: from fmsmsx28.FM.INTEL.COM ([132.233.48.28]) by 132.233.48.205 (Norton AntiVirus for Internet Email Gateways 1.0) ; Fri, 23 Jun 2000 19:29:25 0000 (GMT) Received: by fmsmsx28.fm.intel.com with Internet Mail Service (5.5.2650.21) id ; Fri, 23 Jun 2000 12:29:24 -0700 Message-ID: <9319DDF797C4D211AC4700A0C96B7C9401828FE5@orsmsx42.jf.intel.com> From: "Raj, Ashok" To: "'kgdb@oss.sgi.com'" Subject: startup questions... Date: Fri, 23 Jun 2000 12:29:21 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing Hi I tried sending mail to scott, but he seems out of office for an extended time could somebody on the list help me with the initial startup questions.? i have done the setup and can now connect remotely but 1. Iam only getting addrses printed for stack trace instead of symbols, how would i be able to get symbol table info to the debugger. for user programs we do gdb 2. If i started without the gdb option, can i still be able to reconnect to the debugger? 3. if i get disconnected from gdb for some reason, and i started with the gdb option in lilo, can i reconnect back the kernel? 4. if i have modules how i would be able to debug that. thanks for any help. ashokr From owner-kgdb@oss.sgi.com Fri Jun 23 12:50:01 2000 Received: by oss.sgi.com id ; Fri, 23 Jun 2000 12:49:41 -0700 Received: from sentry.gw.tislabs.com ([192.94.214.100]:10938 "EHLO sentry.gw.tislabs.com") by oss.sgi.com with ESMTP id ; Fri, 23 Jun 2000 12:49:20 -0700 Received: by sentry.gw.tislabs.com; id PAA24546; Fri, 23 Jun 2000 15:51:23 -0400 (EDT) Received: from clipper.gw.tislabs.com(10.33.1.2) by sentry.gw.tislabs.com via smap (V5.5) id xma024542; Fri, 23 Jun 00 15:51:07 -0400 Received: from dustpuppy.va.tislabs.com (IDENT:root@dustpuppy.va.tislabs.com [192.168.10.114]) by clipper.gw.tislabs.com (8.10.1/8.10.1) with ESMTP id e5NJkRm05535 for ; Fri, 23 Jun 2000 15:46:27 -0400 (EDT) Received: from localhost (dougk@localhost) by dustpuppy.va.tislabs.com (8.9.3/8.8.7) with ESMTP id PAA20746 for ; Fri, 23 Jun 2000 15:47:04 -0400 X-Authentication-Warning: dustpuppy.va.tislabs.com: dougk owned process doing -bs Date: Fri, 23 Jun 2000 15:47:04 -0400 (EDT) From: Douglas Kilpatrick X-Sender: dougk@dustpuppy.va.tislabs.com To: kgdb@oss.sgi.com Subject: Re: startup questions... 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, 23 Jun 2000, Raj, Ashok wrote: > 1. Iam only getting addrses printed for stack trace instead of symbols, how > would i be able to get symbol table info > to the debugger. > > for user programs we do gdb gdb vmlinux make sure that the vmlinux you are using is the one the system is using. > 2. If i started without the gdb option, can i still be able to reconnect to > the debugger? My patch on the downloads (the rh62 one) page allows you to connect to the debugger with SysRq-g. (Thats shift-alt-print-scrn-q I think. SysRq support has to be enabled in the kernel and not deactivated by boot scripts) > 3. if i get disconnected from gdb for some reason, and i started with the > gdb option in lilo, can i reconnect back the kernel? See above. Also, any time the system hits a breakpoint, it will block for the debugger. The debugger session does not need to be the same... > 4. if i have modules how i would be able to debug that. Carefully. See the kgdb project on sourceforge for more help. I manage without accessing global variables and recognizing/handling the obviously wrong output. YMMV. The key command is "add-symbol-file 0x
Remember to load the module with the '-m' option to insmod to get the section information. -- dougk@tislabs.com dkilpatr@nai.com From owner-kgdb@oss.sgi.com Thu Jun 29 06:48:31 2000 Received: by oss.sgi.com id ; Thu, 29 Jun 2000 06:48:21 -0700 Received: from nikhefh.nikhef.nl ([192.16.199.1]:32777 "HELO nikhefh.nikhef.nl") by oss.sgi.com with SMTP id ; Thu, 29 Jun 2000 06:48:10 -0700 Received: from lap-244.nikhef.nl [192.16.192.244] (nikhef.nl) by nikhefh.nikhef.nl with ESMTP id PA21337; Thu, 29 Jun 2000 15:48:16 +0200 Message-ID: <395B539F.91AAF4D2@nikhef.nl> Date: Thu, 29 Jun 2000 15:48:15 +0200 From: Jan Evert van Grootheest Organization: Nikhef X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-12 i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: Using kgdb Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms84391F9D3E318E1D0869EF26" Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing This is a cryptographically signed message in MIME format. --------------ms84391F9D3E318E1D0869EF26 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I just thought I'd write this to let you know I appreciate this kgdb thing. I've patched a 2.2.14 kernel with kgdb_2.2.14-rh62.diff and that works pretty good this far. There were no problems of any importance, other than gdb which seems to hangsometimes. Perhaps that's because of the 38400bps I use, but for a PIII-500 that shouldn't be a problem, right?! Backtraces of the stack worked just fine. I found that the module address for add-symbol-file is also easily found using 'grep /proc/ksyms' and then looking for something like __insmod__S.text.... (mine reads actually __insmod_lsd_S.text_L10605 with lsd being the name of the module). The number could be the length of the text section but I'm not sure. The addresses match after using the address with add-symbol-file. I didn't use it for extensive debugging (like some other people, I believe that code should be "obvious"), but it did come in handy at times. Thanks again, Jan Evert -- ------------------------------------------------ Jan Evert van Grootheest Control Application Engineering | Nikhef Cartografenweg 16 | H135 5141MT Waalwijk | +31-20-5925012 +31-416-651525 | --------------ms84391F9D3E318E1D0869EF26 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIIFwYJKoZIhvcNAQcCoIIICDCCCAQCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC BegwggLMMIICNaADAgECAgMCohYwDQYJKoZIhvcNAQEEBQAwgZQxCzAJBgNVBAYTAlpBMRUw EwYDVQQIEwxXZXN0ZXJuIENhcGUxFDASBgNVBAcTC0R1cmJhbnZpbGxlMQ8wDQYDVQQKEwZU aGF3dGUxHTAbBgNVBAsTFENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25h bCBGcmVlbWFpbCBSU0EgMTk5OS45LjE2MB4XDTAwMDUyNDA5MTUyOFoXDTAxMDUyNDA5MTUy OFowcTEXMBUGA1UEBBMOdmFuIEdyb290aGVlc3QxEjAQBgNVBCoTCUphbiBFdmVydDEhMB8G A1UEAxMYSmFuIEV2ZXJ0IHZhbiBHcm9vdGhlZXN0MR8wHQYJKoZIhvcNAQkBFhBqYW5ldmdA bmlraGVmLm5sMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFAeB1UwMIvr2YRSTqy5Dr b8fBfK+UwtQzGtOEP4PKY4BE7PhlWhpyRmwsg0whgPuOnEtVN+eklLLhpgRglFCzzMRrt8gg 2ohp5vvgzWAECRO151wL4d6DDHeztGpgwfeBWM0sy5jBqPMhLsMg5TopZ9R4jv6wbFwG3kQv uczFEwIDAQABo04wTDAbBgNVHREEFDASgRBqYW5ldmdAbmlraGVmLm5sMAwGA1UdEwEB/wQC MAAwHwYDVR0jBBgwFoAUiKvxYINmVfTkWMdGHcBhvSPXw4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oZIhvcNAQEEBQADgYEAa8ZZ6TH66bbssQPY33Jy/pFg SOrGVd178GeOxmFw523CpTfYnbcXKFYFi91cdW/GkZDGbGZxE9AQfGuRb4bgITYtwdfqsgmt zy1txoNSm/u7/pyHnfy36XSS5FyXrvx+rMoNb3J6Zyxrc/WG+Z31AG70HQfOnZ6CYynvkwl+ Vd4xggH3MIIB8wIBATCBnDCBlDELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2Fw ZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUQ2Vy dGlmaWNhdGUgU2VydmljZXMxKDAmBgNVBAMTH1BlcnNvbmFsIEZyZWVtYWlsIFJTQSAxOTk5 LjkuMTYCAwKiFjAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJ KoZIhvcNAQkFMQ8XDTAwMDYyOTEzNDgxNVowIwYJKoZIhvcNAQkEMRYEFMGWIy91d2Mpqz48 t5LiiP7CGXQDMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCA MAcGBSsOAwIHMA0GCCqGSIb3DQMCAgFAMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUA BIGAV+UvDkBucBNWoPHcipOklmfucq9601pcxBXmGwfFAOErvmtUoROEj1Yi9x5K/nAuUgEE TmrAYmYc3sgEjDeqrXYTLjJWIdUPd3ksSjQntVuwfsL5OOYXjf7yGWlPikUPjgJhTyrz/s2v Y0ZTdyQNs6XfKJXK01RWbemab6Fc2b0= --------------ms84391F9D3E318E1D0869EF26-- From owner-kgdb@oss.sgi.com Thu Jun 29 08:35:51 2000 Received: by oss.sgi.com id ; Thu, 29 Jun 2000 08:35:41 -0700 Received: from ganymede.or.intel.com ([134.134.248.3]:8452 "EHLO ganymede.or.intel.com") by oss.sgi.com with ESMTP id ; Thu, 29 Jun 2000 08:35:24 -0700 Received: from SMTP (orsmsxvs02-1.jf.intel.com [192.168.65.201]) by ganymede.or.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.30 2000/06/08 18:25:35 dmccart Exp $) with SMTP id IAA00619 for ; Thu, 29 Jun 2000 08:35:33 -0700 (PDT) Received: from orsmsx29.jf.intel.com ([192.168.70.29]) by 192.168.70.201 (Norton AntiVirus for Internet Email Gateways 1.0) ; Thu, 29 Jun 2000 15:35:33 0000 (GMT) Received: by orsmsx29.jf.intel.com with Internet Mail Service (5.5.2650.21) id ; Thu, 29 Jun 2000 08:35:32 -0700 Message-ID: <9319DDF797C4D211AC4700A0C96B7C9401829009@orsmsx42.jf.intel.com> From: "Raj, Ashok" To: "'kgdb@oss.sgi.com'" Subject: disconnecting from gdb... Date: Thu, 29 Jun 2000 08:35:30 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing Hello.. When i need to disconnect from gdb somehow the target system always goes to breakpoint mode. Is it possible to connect and disconenct without the target system hanging? ashokr