Wanted - Idiots guide to remote debugging

Andrew Sinclair andrews at elprotech.com
Wed Feb 25 00:03:24 UTC 2004


Last I checked, the version for the latest release of RTEMS was broken due 
to changes in the gdb binaries you patch the rtems gdb changes with. 
(Someone may have fixed it by now?)

I had some success with an earlier version of gdb. Refer to
http://www.rtems.com/ml/rtems-users/2003/july/msg00155.html for a process 
to do this.
It is by no means an idiot guide. In essence I was doing the right thing, 
just had an old version of gdb. Also check out the rtems-gdb docs available 
at
 http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.6.0/share/rtems/html/


I have since used serial debugging instead, and have had much success with 
it. Perhaps you would be happier doing this? I run the rtems gdb inside the 
ddd debug program. This is basically what I do:
Step 1. Add the following lines in your Init task:
  init_remote_gdb(); /*for COM port debug*/
  rtems_task_wake_after(5000);
  breakpoint();
Step 2. Connect a "Null-modem" cable between COM1 on your linux box and 
COM2 on your PC386 target machine.
Step 3. On your linux box, make sure i386-rtems-gdb is installed and in 
your PATH. There are RPMs to install this.
Step 4. Run the debugger on your obj file. As I use ddd, the command I 
would use for the http netdemo is : ddd -debugger i386-rtems-gdb -b 38400 
o-optimize/http.obj
This sets ddd to use the i386-rtems-gdb binary, sets the baud rate at 
38400, and loads the non-stripped obj file for the debug symbols.
Step 5. Inside debugger perform the following command when your target is 
waiting:
target remote /dev/ttyS0
This tells gdb to look for your target on COM1 on your linux box.

You are well on your way at this point. If you choose not to use ddd, as I 
have done, then you will need to set the baud rate in gdb somehow.


-----Original Message-----
From:	Stevens Brian
Sent:	Tuesday, 24 February 2004 6:50 PM
To:	'rtems-users at rtems.com'
Subject:	Wanted - Idiots guide to remote debuggi	ng

I have built my target for pc386 and wish to use the remote debugger over
the ethernet connection. Does any one have an idiots guide to how I do the
following:

*	Initialise the net work
*	Set the IP address
*	Initialise the target debugger handler

Thank you


Brian Stevens

QinetiQ
Cody Technology Park,
Ively Road,
Farnborough,
Hampshire
GU14 0LX .
UK

Telephone (01252) 393959
Fax          (01252) 395120



The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution,
or any action taken or omitted to be taken in reliance on such information
is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be monitored.
Calls to QinetiQ may be recorded for quality control,
regulatory and monitoring purposes.



More information about the users mailing list