source: rtems/c/src/librdbg/include/rdbg/rdbg.h @ 4721cf1
Last change on this file since 4721cf1 was 4721cf1, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 3, 1998 at 11:54:14 PM

Patch from Emmanuel Raguet <raguet@…> to add remote debug server
and RPC support to RTEMS. Thanks. :) Email follows:


For Xmas, here is the Remote Debugger on RTEMS !

Here are 2 patches for the Remote Debugger on RTEMS for pc386 from Linux
host :

  • one for RTEMS it self,
  • one for GDB-4.17.

1/ RTEMS patch

This patch adds 2 libraries :

  • a simplified SUN RPC library
  • the Remote Debugger library

The configuration command is the following :
../rtems4/configure --target=i386-rtemself --enable-rtemsbsp=pc386

The SUN RPC library is built only if networking is set.
The RDBG library is built if networking and enable-rdbg are set.

The function used to initialize the debugger is :

rtems_rdbg_initialize ();

A special function has been created to force a task to be
in a "debug" state : enterRdbg().
The use of this function is not mandatory.

2/ GDB-4.17 patch

This patch create a new RTEMS target for GDB-4.17.

The configuration command is the following :
./configure --enable-shared --target=i386RTEMS

To connect to a target, use :

target rtems [your_site_address]

Then, attach the target using : attach 1

And... Debug ;)

You can obtain the original GDB-4.17 on

This has been tested from a Debian 2.0.1 linux host.

  • Property mode set to 100644
File size: 1.5 KB
2 **************************************************************************
3 *
4 * Component =   RDBG
5 *
6 * Synopsis  =   rdbg.h
7 *
8 **************************************************************************
9 */
11#ifndef RDBG_H
12#define RDBG_H
14#include <rpc/rpc.h>
15#include <sys/socket.h>
16#include <netinet/in.h>
17#include <rdbg/rdbg_f.h>
18#include <stdlib.h>             /* For malloc() and free() prototypes */
19#include <bsp.h>                
21#define Malloc(size)            malloc (size)
22#define Free(block)             free (block)
23#define Realloc(block,size)     realloc (block, size)
24#define StrDup(str)             strdup(str)
26#define LIST_PID        16      /* dynamic list of processes/tasks */
27#define LIST_PID_DEB    17      /* list of processes under debug now */
28#define LIST_PID_THREAD 18      /* list of threads for specific process */
29#define LIST_CONN       19      /* dynamic list of connections */
31    /* RTEMS internals */
32extern void     remotedeb_2     (struct svc_req* rqstp, SVCXPRT* transp);
33extern void     setErrno        (int error);
34extern int      getErrno        ();
35extern int      ptrace          (int request, int pid, char* addr,
36                                 int data, char* addr2);
38extern int                      TSP_RETRIES;
39extern volatile int             ExitForSingleStep;
40extern volatile int             justSaveContext;
41extern volatile Objects_Id      currentTargetThread;
42extern volatile int             CannotRestart;
43extern volatile int             TotalReboot;
45    /* Missing RPC prototypes */
46SVCXPRT*  svcudp_create         (int fd);
47void      svc_processrequest    (SVCXPRT* xprt,
48                                 u_long prog, u_long vers,
49                                 void (*dispatch)());
50int       svcudp_enablecache    (SVCXPRT *transp, u_long size);
52#endif /* !RDBG_H */
Note: See TracBrowser for help on using the repository browser.