# Problem with Remote Kernel Debugging using GDB



## GroupInode (Jan 14, 2012)

Guys I am trying to remotely debug my FreeBSD machine using gdb. For this I have complied the GENERIC kernel with following debugging options:

```
OPTIONS gdb
OPTIONS ddb
```

 Then I have complied my kernel using following commands

```
#cd /usr/src/sys/i386/conf
#cp GENERIC DBGKERN

#cd /usr/src
#make buildkernel KERNCONF=DBGKERN
#make installkernel KERNCONF=DBGKERN
```


Then i connected the two machines with the same kernel named DBGKERN using DB09 female-female cable(nullmodem). Now when i run the debugee machine using boot -g options the system response is very slow and it gets stuck while displaying dmesg output. When I try from inside the OS by running KGDB on debugger machine and enter command
	
	



```
#syscntl kdbg.debug.enter=1
```
It enters into a non responsive db session while the debugger machine shows an error *"Malformed response to offset query, timeout"*

Please help me soon. Thank you


----------

