diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-03 23:54:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-03 23:54:14 +0000 |
commit | 4721cf1ecb949b37c98b6fce79163541711de2e5 (patch) | |
tree | a89f2bef604b2ddf22b262fe6115d9f75c952781 /c/src/librdbg/include/rdbg/rdbg.h | |
parent | Removed spaces. (diff) | |
download | rtems-4721cf1ecb949b37c98b6fce79163541711de2e5.tar.bz2 |
Patch from Emmanuel Raguet <raguet@crf.canon.fr> to add remote debug server
and RPC support to RTEMS. Thanks. :) Email follows:
Hello,
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
--enable-rdbg
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
ftp://ftp.debian.org/debian/dists/stable/main/source/devel/gdb_4.17.orig.tar.gz
This has been tested from a Debian 2.0.1 linux host.
Diffstat (limited to 'c/src/librdbg/include/rdbg/rdbg.h')
-rw-r--r-- | c/src/librdbg/include/rdbg/rdbg.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/c/src/librdbg/include/rdbg/rdbg.h b/c/src/librdbg/include/rdbg/rdbg.h new file mode 100644 index 0000000000..737edd5575 --- /dev/null +++ b/c/src/librdbg/include/rdbg/rdbg.h @@ -0,0 +1,53 @@ +/* + ************************************************************************** + * + * Component = RDBG + * + * Synopsis = rdbg.h + * + ************************************************************************** + */ + +#ifndef RDBG_H +#define RDBG_H + +#include <rpc/rpc.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <rdbg/rdbg_f.h> +#include <stdlib.h> /* For malloc() and free() prototypes */ +#include <bsp.h> + +#define Malloc(size) malloc (size) +#define Free(block) free (block) +#define Realloc(block,size) realloc (block, size) +#define StrDup(str) strdup(str) + +#define LIST_PID 16 /* dynamic list of processes/tasks */ +#define LIST_PID_DEB 17 /* list of processes under debug now */ +#define LIST_PID_THREAD 18 /* list of threads for specific process */ +#define LIST_CONN 19 /* dynamic list of connections */ + + /* RTEMS internals */ +extern void remotedeb_2 (struct svc_req* rqstp, SVCXPRT* transp); +extern void setErrno (int error); +extern int getErrno (); +extern int ptrace (int request, int pid, char* addr, + int data, char* addr2); + +extern int TSP_RETRIES; +extern volatile int ExitForSingleStep; +extern volatile int justSaveContext; +extern volatile Objects_Id currentTargetThread; +extern volatile int CannotRestart; +extern volatile int TotalReboot; + + /* Missing RPC prototypes */ +SVCXPRT* svcudp_create (int fd); +void svc_processrequest (SVCXPRT* xprt, + u_long prog, u_long vers, + void (*dispatch)()); +int svcudp_enablecache (SVCXPRT *transp, u_long size); + +#endif /* !RDBG_H */ + |