source: rtems/c/src/lib/include/rdbg/i386/rdbg_f.h @ 4721cf1

4.104.114.84.95
Last change on this file since 4721cf1 was 4721cf1, checked in by Joel Sherrill <joel.sherrill@…>, on 12/03/98 at 23:54:14

Patch from Emmanuel Raguet <raguet@…> 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.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 **************************************************************************
3 *
4 * Component =   RDBG
5 * Module =   rdbg_f.h
6 *
7 * Synopsis = Machine-dependent header file
8 *
9 **************************************************************************
10 */
11
12#ifndef RDBG_F_H
13#define RDBG_F_H
14
15#include <rtems.h>
16#include <rdbg/remdeb.h>
17
18#define EFLAGS_TF 0x00100
19
20typedef struct Exception_context_struct {
21  struct Exception_context_struct *next;
22  struct Exception_context_struct *previous;
23  Objects_Id id;
24  Objects_Id semaphoreId;
25  CPU_Exception_frame *ctx;
26} Exception_context;
27
28extern int      PushExceptCtx           (Objects_Id Id,
29                                         Objects_Id semId,
30                                         CPU_Exception_frame *ctx);
31extern int      PopExceptCtx            (Objects_Id Id);
32extern Exception_context *GetExceptCtx  (Objects_Id Id);
33extern int      Single_Step             (CPU_Exception_frame* ctx);
34extern int      CheckForSingleStep      (CPU_Exception_frame* ctx);
35extern void     BreakPointExcHdl        (CPU_Exception_frame *ctx);
36extern void     CtxToRegs               (const CPU_Exception_frame*,xdr_regs*);
37extern void     RegsToCtx               (const xdr_regs*,CPU_Exception_frame*);
38
39extern void     enterRdbg               ();
40extern void     get_ctx_thread          (Thread_Control *thread,
41                                         CPU_Exception_frame* ctx);
42extern void     set_ctx_thread          (Thread_Control *thread,
43                                         CPU_Exception_frame* ctx);
44
45void copyback_data_cache_and_invalidate_instr_cache();
46
47extern int      ExitForSingleStep;
48
49
50#endif
51
52
53
Note: See TracBrowser for help on using the repository browser.