RTEMS gdb
Thomas Smeraldi
thomas at utstar.com
Wed Dec 5 14:37:44 UTC 2001
I am trying to run the gdb-5.0 RTEMS debugger under
Cygwin. I have a target EST eval board using
an MPC8260 CPU running RTEMS 4.5.0. After some code changes
to get the target debug code to compile and after many
emails and FTP downloads from Joel, I am
able to set the rtems related RPC options sited in the user
manual:
'setrpcmode sun'
'setdaemontype rdbg'
'target rtems <ip address>'
I am able to connect to the target at this point and receive
the message:
Attaching remote machine across net...
Connected to 172.16.12.55.
Now the "run" command will start a remote process.
I follow this with the 'file' command to load symbols and then
'attach 1' returns:
[Switching to process 134283280]
0x4d1f0 in enterRdbg ()
No other gdb commands at this point are sent to the target. Through
a series of printf debug statements I have confirmed that none of the
'target_ops' are executed other than 'attach' and 'detach'.
The 'info threads' command prints a thread list which was updated by
'attach' but never runs the target command to update it again.
After several days and weeks sifting through the code, I have found
that target_attach and target_detach are defined as macros like:
#define target_attach(args, from_tty) \
(*current_target.to_attach) (args, from_tty)
while other commands like setting breakpoints go through a command
table structure that do not execute the remote target functions.
How do I get the target_ops routines to execute? The new target routines
are added from init.c-_initialize_rte() which calls 'add_target' with the
new target structure 'remote_run_ops'. They are in a table but
never called. Most, if not all, remote target routines are in
gdb/remote_rte.c.
Overall, I've been struggling with this off and on for almost three
months. I've posted messages to the GDB users group with no help. The
company I work for pays for support from OAR and they have only helped
in providing source code and compile help. Is there anyone who has
tried to use the GDB to debug target RTEMS on MPC8260 or any
other platform for that matter that supports the remote
RTEMS debug capability?
Frustrated and at my wits end. I keep telling my boss that I'm close
but I think it's starting to wear a little thin.
More information about the users
mailing list