problems of "target rtems" and "attach" in remote debugging with gdb

Yan Luo yan_luo at uml.edu
Thu Dec 1 15:00:23 UTC 2005


Hello,

I have problems with i386-rtems-gdb when remote debugging over RPC.  
one problem is the "target rtems" command, gdb connected with remote  
server but complained with the Magic number error. The other problem  
is "attach 1" afterwards, gdb said "Dont know how to attach, try  
'help target'". Let me describe my setup and steps.

Our experiment setup is as follows: concurrent technologies VP101  
PentiumIII VME board,  suse linux as development host. VME boards  
boots up through BOOTP. RTEMS 4.6.5, netdemo application.

First, i386-rtems-gdb compiled with the patches (downloaded together  
with RTEMS 4.6.5)  did not recognize "setrpcmode" or "setdaemontype".  
After google around, I followed the instructions at http:// 
www.rtems.org/ml/rtems-users/2001/june/msg00065.html, and added  
"'remote-rte.o rtems.o thread_rte.o rtems/rteRemDebXdr.o' to the gdb/ 
Makefile COMMON_OBJS. Then after fixing a number of compilation  
errors, the i386-rtems-gdb generated does recognize setrpcmode and  
setdaemontype commands.

Second, I setup the netdemo application, and it worked well. When  
telnet to the remote target, the strings typed were echoed back  
correctly. I could also ping the remote target. Then I added  
"rtems_rdbg_initialize()" in init.c to bring up rdbg server. That  
worked as I could see RDBG was up running on console.

Third, in i386-rtems-gdb, I did setrpcmode and setdaemontype. After I  
issued "target rtems remote-name", gdb showed the remote target is  
connected. However it complained about the magic number. I then tried  
"attach 1", gdb said Dont know how to attach, try 'help target'".

I noticed that, the target_ops structure in remote-rte.c is different  
from the structure described in "RTEMS Remote Debugger Server  
Specifications". I guess this might be the reason of magic number error.

Any  suggestions how to fix the problems?

Thanks.
Yan Luo






More information about the users mailing list