Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
5496 leency 1
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
2
#ifndef __dj_include_debug_redir_h_
3
#define __dj_include_debug_redir_h_
4
 
5
#ifdef __cplusplus
6
extern "C" {
7
#endif
8
 
9
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
10
 
11
#ifndef __STRICT_ANSI__
12
 
13
#ifndef _POSIX_SOURCE
14
 
15
/* How many handles do we track.
16
   WARNING: if you change this, you need to recompile dbgredir.c !!! */
17
#define DBG_HANDLES 3
18
 
19
/* Describe a single redirected handle.
20
   Actually only inf_handle and our_handle are currently used (and
21
   even they could share the same slot), but I'm keeping the rest,
22
   mostly because they might be useful for applications.  */
23
struct dbg_redirect {
24
  int inf_handle;
25
  int our_handle;
26
  char *file_name;
27
  int mode;
28
  off_t filepos;
29
};
30
 
31
/* cmdline_parse_args processes command lines into the following structure: */
32
typedef struct _cmdline {
33
  char *command;		    /* command line with redirection removed */
34
  int redirected;		    /* 1 if handles redirected for child */
35
  struct dbg_redirect **redirection;/* info about redirected handles */
36
} cmdline_t;
37
 
38
extern void redir_cmdline_delete (cmdline_t *);
39
extern int  redir_cmdline_parse (const char *, cmdline_t *);
40
extern int  redir_to_child (cmdline_t *);
41
extern int  redir_to_debugger (cmdline_t *);
42
extern int  redir_debug_init (cmdline_t *);
43
 
44
#endif /* !_POSIX_SOURCE */
45
#endif /* !__STRICT_ANSI__ */
46
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
47
 
48
#ifndef __dj_ENFORCE_FUNCTION_CALLS
49
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
50
 
51
#ifdef __cplusplus
52
}
53
#endif
54
 
55
#endif /* !__dj_include_debug_dbgcom_h_ */