Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 1997 16:26:41 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        current@FreeBSD.ORG
Subject:   Re: Problems using remote gdb
Message-ID:  <19970508162641.DE47196@uriah.heep.sax.de>
In-Reply-To: <199705080042.KAA27367@godzilla.zeta.org.au>; from Bruce Evans on May 8, 1997 10:42:23 %2B1000
References:  <199705080042.KAA27367@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote:

> No.  The console driver doesn't know about low level consoles.  There are
> now 3 layers of consoles:
> 
> 	/dev/console - an ordinary device, written to by syslogd, etc.
> 	low level part of console driver - used for kernel printfs
> 	low level consoles - lower than the console driver, called directly
> 	    by i386_gdbstub.

So now, what has the handbook to be changed to?

Bruce, reading the handbook isn't rocket science :), just in case you
don't know how to use Lynx, here's the appropriate paragraphs:

------------------------------------------------------------------------
   You should configure the kernel in question with config -g, include
   DDB into the configuration, and compile it as usual. This gives a
   large blurb of a binary, due to the debugging information. Copy this
   kernel to the target machine, strip the debugging symbols off with
   strip -x, and boot it using the -d boot option. Connect the first
   serial line of the target machine to any serial line of the debugging
   host. Now, on the debugging machine, go to the compile directory of
   the target kernel, and start gdb:

% gdb -k kernel                                
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.   
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-freebsd),                                      
Copyright 1996 Free Software Foundation, Inc...                        
(kgdb)                                                                

   Initialize the remote debugging session (assuming the first serial
   port is being used) by:                       

(kgdb) target remote /dev/cuaa0                                       
   
   Now, on the target host (that entered DDB right before even starting
   the device probe), type:                                          

Debugger("Boot flags requested debugger")                               
Stopped at      Debugger+0x35: movb     $0, edata+0x51bc              
db> gdb                             

   DDB will respond with:                      

Next trap will enter GDB remote protocol mode                           
------------------------------------------------------------------------

Somewhere there, the information about which flags to sio0 are
required and which are useful should go.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970508162641.DE47196>