gdb with rdgb support

Andrew Sinclair andrews at elprotech.com
Thu Jul 31 05:31:08 UTC 2003


Hi there,

I have encountered the same issue with gdb 5.2. Has anyone resolved this 
problem?

Instead I am using an older version at the moment, installed from file 
i386-RTEMS-gdb-5.0-7.i386.rpm. (Can be found at 
ftp://ftp.oarcorp.com/pub/rtems/snapshots/c_tools/gdb-5.0-7/linux_x86/RP  
MS/)

It appears to work, although I am having problems loading debug symbols. I 
have been running rdgb on the http network demo using the standard makefile 
included in network-demos-4.6.0pre4.tar.bz2. I have added the following 
lines after rtems_bsdnet_initialize_network () inside init.c:

rtems_rdbg_initialize();
enterRdbg();

I have been unable to identify where the debug symbols have been stripped 
off from the executable. Does anyone know how to keep these symbols? I have 
tried using the http.obj file produced in the build, however I cant get 
links to source files correctly.

This is what I get when I remote debug to a machine at 169.254.100.112:

[andrews at store http]$ i386-RTEMS-gdb
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or 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.
This GDB was configured as "--host=i686-pc-linux-gnu --target=i386-RTEMS".
(gdb) setrpcmode sun
(gdb) setdaemontype rdbg
(gdb) target rtems 169.254.100.112
Attaching remote machine across net...
Connected to 169.254.100.112.
Now the "run" command will start a remote process.
(gdb) file o-optimize/http.obj
Reading symbols from o-optimize/http.obj...done.
(gdb) attach 1
Attaching program: 
/rtems/tools/network-demos-4.6.0pre4/http/o-optimize/http.obj
 pid 1
[Switching to process 167837703]
enterRdbg () at {standard input}:27
27      {standard input}: No such file or directory.

Does anyone know what I am doing wrong?

Kind Regards

Andrew Sinclair


-----Original Message-----
From:	Per Dalgas Jakobsen [SMTP:pdj at maridan.dk]
Sent:	Thursday, 24 July 2003 10:02 PM
To:	Rtems-Users (E-mail)
Subject:	gdb with rdgb support

Hi,

I have some trouble compiling gdb with rdgb support.
Configuring with:
.../configure --verbose --target=i386-rtems --prefix=/usr/local/rtems
succeeds, but when entering:
$ gdb
.. yada yada ...
This GDB was configured as "--host=i686-pc-cygwin --target=i386-rtems"...
(gdb) setrpcmode sun
(gdb) setdaemontype rdbg
(gdb) target rtems target-name
fails undefined commands (and undefined target command).


I searched the archives a bit and found this thread: 
http://www.rtems.com/rtems/maillistArchives/rtems-users/2000/october/msg  
00010.html

Seemed exactly like my problem, but when attempting to configure with 
--target=i386-RTEMS i get "Invalid configuration `i386-RTEMS': system 
`RTEMS' not recognized".

I have patched the gdb-5.2 source with:
gdb-5.2-rtems-base-20030211.diff
gdb-5.2-rtems-cg-20030211.diff 	# not sure if this one is needed.
gdb-5.2-rtems-rdbg-20030211.diff
All successful.


Any suggestions?

While we are at the remote gdb-stuff: What is the prefered way to start an 
Ada program on the remote and make it wait for the gdb-client before 
starting?

Best regards
Per

PS: Sorry for that #$")!/&% footer, IT is still working on it 
(idle-priority i guess).


---
IMPORTANT
The information contained in this e-mail is privileged and confidential 
information intended only for the use of the individual or entity named 
above. If the reader of this message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this 
communication in error, please immediately notify us by e-mail or 
telephone.
Thank you in advance.
---



More information about the users mailing list