Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4680 right-hear 1
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
2
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
3
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
4
#ifndef __dj_include_debug_dbgcom_h_
5
#define __dj_include_debug_dbgcom_h_
6
 
7
#ifdef __cplusplus
8
extern "C" {
9
#endif
10
 
11
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
12
 
13
#ifndef __STRICT_ANSI__
14
 
15
#ifndef _POSIX_SOURCE
16
 
17
#include 
18
#include 
19
 
20
typedef struct {
21
  unsigned long app_base;	/* linear base address of application */
22
  unsigned long dr[8];		/* debug registers, set when a_tss runs */
23
} ExternalDebuggerInfo;
24
 
25
extern ExternalDebuggerInfo edi;
26
 
27
/* structure of FPU state                       */
28
/* 14 bytes for FPU env                         */
29
/* plus 8*10 bytes from the FPU stack           */
30
/* r[8] is the array as defined in intel docs   */
31
/* st0 is r[top]                                */
32
 
33
#define NPX_TOP_MASK 0x3800
34
#define NPX_TOP_SHIFT 11
35
 
36
typedef struct {
37
  unsigned short sig0;
38
  unsigned short sig1;
39
  unsigned short sig2;
40
  unsigned short sig3;
41
  unsigned short exponent:15;
42
  unsigned short sign:1;
43
} NPXREG;
44
 
45
typedef struct {
46
  unsigned long control;
47
  unsigned long status;
48
  unsigned long tag;
49
  unsigned long eip;
50
  unsigned long cs;
51
  unsigned long dataptr;
52
  unsigned long datasel;
53
  NPXREG reg[8];
54
  long double st[8];
55
  char st_valid[8];
56
  long double mmx[8];
57
  char in_mmx_mode;
58
  char top;
59
} NPX;
60
 
61
extern NPX npx;
62
 
63
void save_npx (void); /* Save the FPU of the debugged program */
64
void load_npx (void); /* Restore the FPU of the debugged program */
65
 
66
void run_child(void);
67
int read_child(unsigned child_addr, void *buf, unsigned len);
68
int write_child(unsigned child_addr, void *buf, unsigned len);
69
void edi_init(jmp_buf start_state);
70
void cleanup_client(void);
71
 
72
#endif /* !_POSIX_SOURCE */
73
#endif /* !__STRICT_ANSI__ */
74
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
75
 
76
#ifndef __dj_ENFORCE_FUNCTION_CALLS
77
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
78
 
79
#ifdef __cplusplus
80
}
81
#endif
82
 
83
#endif /* !__dj_include_debug_dbgcom_h_ */