KGDB

2018-07-17 Thread Phil Nelson
Hello, Does anyone know if KGDB will work across a pcie serial card or does it need to be the old motherboard ones?How about usb? --Phil

Re: kgdb on amd64

2015-07-09 Thread Patrick Welche
On Thu, Jul 09, 2015 at 04:47:19PM +0100, Patrick Welche wrote: kvtopte() is defined in sys/arch/x86/include/pmap.h: static __inline pt_entry_t * __unused kvtopte(vaddr_t va) { pd_entry_t *pde; KASSERT(va = VM_MIN_KERNEL_ADDRESS); pde = L2_BASE + pl2_i(va); if

Re: kgdb on amd64

2015-06-26 Thread Timo Buhrmester
On Wed, Jun 24, 2015 at 05:50:41PM +, Christos Zoulas wrote: The reason kgdb wasn't working all this time on amd64 is that GETC() returns -1 immediately whether or not a character is available = all of kgdb's checksums fail due to the extra -1 characters. Wow, seems like we analyzed

Re: kgdb on amd64

2015-06-26 Thread Christos Zoulas
On Jun 26, 3:55pm, fstd.l...@gmail.com (Timo Buhrmester) wrote: -- Subject: Re: kgdb on amd64 | On Wed, Jun 24, 2015 at 05:50:41PM +, Christos Zoulas wrote: | The reason kgdb wasn't working all this time on amd64 is that GETC() | returns -1 immediately whether or not a character

Re: KGDB/i386 broken/supposed to work?

2015-06-25 Thread Timo Buhrmester
I'll keep digging. The problem is that KGDB isn't prepared to deal with the non-blocking serial port reads that matt's commit introduced in 2013 (am I really the first one to try this on bare metal since then?) Where the read function `com_common_getc` used to block, it will now return -1

kgdb on amd64

2015-06-24 Thread Patrick Welche
The reason kgdb wasn't working all this time on amd64 is that GETC() returns -1 immediately whether or not a character is available = all of kgdb's checksums fail due to the extra -1 characters. A quick revert of RCS file: /cvsroot/src/sys/dev/ic/com.c,v revision

Re: kgdb on amd64

2015-06-24 Thread Patrick Welche
On Wed, Jun 24, 2015 at 04:42:12PM +0100, Patrick Welche wrote: The reason kgdb wasn't working all this time on amd64 is that GETC() returns -1 immediately whether or not a character is available = all of kgdb's checksums fail due to the extra -1 characters. The attached gets us that far

Re: kgdb on amd64

2015-06-24 Thread Christos Zoulas
In article 20150624163947.ga17...@quark.internal.precedence.co.uk, Patrick Welche pr...@cam.ac.uk wrote: -=-=-=-=-=- On Wed, Jun 24, 2015 at 04:42:12PM +0100, Patrick Welche wrote: The reason kgdb wasn't working all this time on amd64 is that GETC() returns -1 immediately whether

Re: KGDB/i386 broken/supposed to work?

2015-06-22 Thread Timo Buhrmester
There is no delay between ``kgdb waiting...'' and ``fatal breakpoint trap in supervisor mode''. Looks like that behavior was introduced by the following commit to src/sys/arch/i386/i386/trap.c: revision 1.239 date: 2008-05-30 13:38:21 +0300; author

Re: KGDB/i386 broken/supposed to work?

2015-06-22 Thread Andreas Gustafsson
Timo Buhrmester wrote: Using a GENERIC kernel with only the modifications required to enable KGDB (see bottom for config diff), I get the following behavior on the TARGET machine: | boot netbsd -d | 15741968+590492+466076 [689568+730405]=0x1161fd4 | kernel text is mapped with 4 large

Re: KGDB/i386 broken/supposed to work?

2015-06-22 Thread Greg Troxel
I am a bit fuzzy on the details, but definitely in 2010 on netbsd-5 remote kgdb on i386 worked. I am 95% sure it still worked on netbsd-6 in 2011/2012. pgpCcJa1jGgY9.pgp Description: PGP signature

KGDB/i386 broken/supposed to work?

2015-06-19 Thread Timo Buhrmester
I'm failing to get KGDB on i386 working for kernel debugging over a serial (nullmodem) link, as described in http://www.netbsd.org/docs/kernel/kgdb.html The TARGET (to-be-debugged) system has two serial ports, com0 is the boot console, com1 is what I set KGDB to operate on. The REMOTE (debugger

Re: KGDB/i386 broken/supposed to work?

2015-06-19 Thread Christos Zoulas
In article 20150619201302.GA243@frozen.localdomain, Timo Buhrmester fstd.l...@gmail.com wrote: I'm failing to get KGDB on i386 working for kernel debugging over a serial (nullmodem) link, as described in http://www.netbsd.org/docs/kernel/kgdb.html The TARGET (to-be-debugged) system has two

Re: kgdb on NetBSD/amd64 6.99.23

2013-09-19 Thread Jan Danielsson
On 9/18/13 7:00 PM, Jan Danielsson wrote: I'm trying to get kgdb working between two virtual box instances. (I have verified that /dev/tty00 - /dev/tty00 works by running GENERIC kernels and minicom on both virtual machines). [---] Problem #1 solved (worked-around). It looks like RB_KDB

Re: kgdb on NetBSD/amd64 6.99.23

2013-09-19 Thread Christos Zoulas
In article 523aab61.8000...@gmail.com, Jan Danielsson jan.m.daniels...@gmail.com wrote: On 9/18/13 7:00 PM, Jan Danielsson wrote: I'm trying to get kgdb working between two virtual box instances. (I have verified that /dev/tty00 - /dev/tty00 works by running GENERIC kernels and minicom

kgdb on NetBSD/amd64 6.99.23

2013-09-18 Thread Jan Danielsson
Hello, I'm trying to get kgdb working between two virtual box instances. (I have verified that /dev/tty00 - /dev/tty00 works by running GENERIC kernels and minicom on both virtual machines). I basically did what is documented on: http://www.netbsd.org/docs/kernel/kgdb.html The webpage

How to use kgdb on development board with single UART port

2012-12-05 Thread Dahua Mei
I'm trying to debug netbsd kernel in beagleboard rev. B. It has only one UART port. Although I enabled KGDB in the conf file and commented out DDB like following: #optionsDDB # in-kernel debugger #optionsDDB_ONPANIC=1 #optionsDDB_HISTORY_SIZE=100# Enable history editing

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-07-12 Thread Reinoud Zandijk
hi folks, sorry i'm so late :) On Fri, Jun 08, 2012 at 01:35:44PM -0700, Israel Jacquez wrote: When I invoke dmesg(8): dmesg | grep -E '^com', I get the following: com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo com0: console com0: kgdb and thats the issue: you are multiplexing

Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Israel Jacquez
in the kernel config file: options DDB options DDB_HISTORY_SIZE=512 options KGDB options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=115200 makeoptions DEBUG=-g After compiling the kernel on the remote machine (Debian GNU/Linux), I copy the new kernel to / on the target machine and I see: When I

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Paul_Koning
On Jun 8, 2012, at 4:35 PM, Israel Jacquez wrote: Hello, I'll make this short. I can't seem to get debugging support working even when following the guide: http://www.netbsd.org/docs/kernel/kgdb.html. ... Immediately, I get dropped into DDB. I can only see this through the serial

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Israel Jacquez
On Fri, Jun 8, 2012 at 1:46 PM, paul_kon...@dell.com wrote: On Jun 8, 2012, at 4:35 PM, Israel Jacquez wrote: Hello, I'll make this short. I can't seem to get debugging support working even when following the guide: http://www.netbsd.org/docs/kernel/kgdb.html. ... Immediately, I get

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Greg Troxel
For what it's worth, some of my colleagues are successfully using the gdb from netbsd-5 (and I'm 99% sure netbsd-6) with the corresponding systems (all i386) on serial ports. Your output reports make me wonder if gdb changed the protocol. I'd look at the gdb 7 sources to see if there is an

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Israel Jacquez
On Fri, Jun 8, 2012 at 2:10 PM, Greg Troxel g...@ir.bbn.com wrote: For what it's worth, some of my colleagues are successfully using the gdb from netbsd-5 (and I'm 99% sure netbsd-6) with the corresponding systems (all i386) on serial ports. I'll try to build an older version of GDB, possibly

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Israel Jacquez
On Fri, Jun 8, 2012 at 2:08 PM, paul_kon...@dell.com wrote: On Jun 8, 2012, at 4:53 PM, Israel Jacquez wrote: On Fri, Jun 8, 2012 at 1:46 PM,  paul_kon...@dell.com wrote: On Jun 8, 2012, at 4:35 PM, Israel Jacquez wrote: Hello, I'll make this short. I can't seem to get debugging support

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Paul_Koning
On Jun 8, 2012, at 5:14 PM, Israel Jacquez wrote: ... Maybe I don't understand the work flow. Should I then wait until I get to the login prompt in order to fire up GDB? What if it crashes halfway through? The problem is that it's headless so I don't know what's going on. I guess I could

re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread matthew green
options DDB try removing this one. .mrg.

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Eduardo Horvath
-CURRENT I have enabled the following options in the kernel config file: options DDB options DDB_HISTORY_SIZE=512 options KGDB options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=115200 makeoptions DEBUG=-g After compiling the kernel on the remote machine (Debian GNU/Linux), I copy

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Paul_Koning
On Jun 8, 2012, at 4:53 PM, Israel Jacquez wrote: On Fri, Jun 8, 2012 at 1:46 PM, paul_kon...@dell.com wrote: On Jun 8, 2012, at 4:35 PM, Israel Jacquez wrote: Hello, I'll make this short. I can't seem to get debugging support working even when following the guide:

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Israel Jacquez
on the i386 port Remote: Debian GNU/Linux Kernel on target: NetBSD-CURRENT I have enabled the following options in the kernel config file: options DDB options DDB_HISTORY_SIZE=512 options KGDB options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=115200 makeoptions DEBUG=-g After

Re: KGDB, serial ports, and MP

2010-05-13 Thread Greg Troxel
list. I need to find an MP host to test it on... I have boxes to test if you want to send a patch. A related question - on what platforms do people think kgdb works reasonably well now (in netbsd-5, and current)? Someone here has run into problems on amd64 with register ordering on transfer

FireWire debugging (was Re: KGDB, serial ports, and MP)

2010-05-13 Thread David Young
On Thu, May 13, 2010 at 12:52:44PM +, Andrew Doran wrote: Debugging via firewire is a much better bet.. It should only take a few hours to make the necessary adjustments to libkvm and the driver. Nobody has stepped up to the plate yet though. Andrew, Will you write an outline of the

KGDB, serial ports, and MP

2010-05-12 Thread Greg Troxel
I've run into the bug described at: http://mail-index.netbsd.org/netbsd-bugs/2010/03/17/msg016596.html and the proposed fix (splserial) seems to work. This is on an amd64 VM; we'll try a physical (multi-cpu) machine as well. Reading the various messages, I get the impression that KGDB on MP

RE: KGDB, serial ports, and MP

2010-05-12 Thread Paul Koning
it on... paul -Original Message- From: tech-kern-ow...@netbsd.org [mailto:tech-kern-ow...@netbsd.org] On Behalf Of Greg Troxel Sent: Wednesday, May 12, 2010 6:40 PM To: tech-kern@netbsd.org Subject: KGDB, serial ports, and MP I've run into the bug described