/contrib/media/updf/me/include/debug/dbgcom.h |
---|
0,0 → 1,83 |
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ |
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_dbgcom_h_ |
#define __dj_include_debug_dbgcom_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
#include <setjmp.h> |
#include <debug/tss.h> |
typedef struct { |
unsigned long app_base; /* linear base address of application */ |
unsigned long dr[8]; /* debug registers, set when a_tss runs */ |
} ExternalDebuggerInfo; |
extern ExternalDebuggerInfo edi; |
/* structure of FPU state */ |
/* 14 bytes for FPU env */ |
/* plus 8*10 bytes from the FPU stack */ |
/* r[8] is the array as defined in intel docs */ |
/* st0 is r[top] */ |
#define NPX_TOP_MASK 0x3800 |
#define NPX_TOP_SHIFT 11 |
typedef struct { |
unsigned short sig0; |
unsigned short sig1; |
unsigned short sig2; |
unsigned short sig3; |
unsigned short exponent:15; |
unsigned short sign:1; |
} NPXREG; |
typedef struct { |
unsigned long control; |
unsigned long status; |
unsigned long tag; |
unsigned long eip; |
unsigned long cs; |
unsigned long dataptr; |
unsigned long datasel; |
NPXREG reg[8]; |
long double st[8]; |
char st_valid[8]; |
long double mmx[8]; |
char in_mmx_mode; |
char top; |
} NPX; |
extern NPX npx; |
void save_npx (void); /* Save the FPU of the debugged program */ |
void load_npx (void); /* Restore the FPU of the debugged program */ |
void run_child(void); |
int read_child(unsigned child_addr, void *buf, unsigned len); |
int write_child(unsigned child_addr, void *buf, unsigned len); |
void edi_init(jmp_buf start_state); |
void cleanup_client(void); |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_dbgcom_h_ */ |
/contrib/media/updf/me/include/debug/redir.h |
---|
0,0 → 1,55 |
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_redir_h_ |
#define __dj_include_debug_redir_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
/* How many handles do we track. |
WARNING: if you change this, you need to recompile dbgredir.c !!! */ |
#define DBG_HANDLES 3 |
/* Describe a single redirected handle. |
Actually only inf_handle and our_handle are currently used (and |
even they could share the same slot), but I'm keeping the rest, |
mostly because they might be useful for applications. */ |
struct dbg_redirect { |
int inf_handle; |
int our_handle; |
char *file_name; |
int mode; |
off_t filepos; |
}; |
/* cmdline_parse_args processes command lines into the following structure: */ |
typedef struct _cmdline { |
char *command; /* command line with redirection removed */ |
int redirected; /* 1 if handles redirected for child */ |
struct dbg_redirect **redirection;/* info about redirected handles */ |
} cmdline_t; |
extern void redir_cmdline_delete (cmdline_t *); |
extern int redir_cmdline_parse (const char *, cmdline_t *); |
extern int redir_to_child (cmdline_t *); |
extern int redir_to_debugger (cmdline_t *); |
extern int redir_debug_init (cmdline_t *); |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_dbgcom_h_ */ |
/contrib/media/updf/me/include/debug/stab.h |
---|
0,0 → 1,76 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_stab_h_ |
#define __dj_include_debug_stab_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
/* This is file STAB.H */ |
/* |
** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 |
** |
** This file is distributed under the terms listed in the document |
** "copying.dj", available from DJ Delorie at the address above. |
** A copy of "copying.dj" should accompany this file; if not, a copy |
** should be available from where this file was obtained. This file |
** may not be distributed without a verbatim copy of "copying.dj". |
** |
** This file is distributed WITHOUT ANY WARRANTY; without even the implied |
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
*/ |
#if !defined (N_UNDF) |
#define N_UNDF 0 |
#endif |
#if !defined (N_ABS) |
#define N_ABS 2 |
#endif |
#if !defined (N_TEXT) |
#define N_TEXT 4 |
#endif |
#if !defined (N_DATA) |
#define N_DATA 6 |
#endif |
#if !defined (N_BSS) |
#define N_BSS 8 |
#endif |
#if !defined (N_FN) |
#define N_FN 15 |
#endif |
#if !defined (N_EXT) |
#define N_EXT 1 |
#endif |
#if !defined (N_TYPE) |
#define N_TYPE 0x1e |
#endif |
#if !defined (N_STAB) |
#define N_STAB 0xe0 |
#endif |
#if !defined (N_SO) |
#define N_SO 0x64 |
#endif |
#if !defined (N_SLINE) |
#define N_SLINE 0x44 |
#endif |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_stab_h_ */ |
/contrib/media/updf/me/include/debug/syms.h |
---|
0,0 → 1,65 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_syms_h_ |
#define __dj_include_debug_syms_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
/* This is file SYMS.H */ |
/* |
** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 |
** |
** This file is distributed under the terms listed in the document |
** "copying.dj", available from DJ Delorie at the address above. |
** A copy of "copying.dj" should accompany this file; if not, a copy |
** should be available from where this file was obtained. This file |
** may not be distributed without a verbatim copy of "copying.dj". |
** |
** This file is distributed WITHOUT ANY WARRANTY; without even the implied |
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
*/ |
#ifndef _SYMS_H_ |
#define _SYMS_H_ |
void syms_init(char *fname); |
void syms_list(int byval); |
unsigned long syms_name2val(const char *name); |
char *syms_val2name(unsigned long val, unsigned long *delta); |
char *syms_val2line(unsigned long val, int *lineret, int exact); |
char *syms_module(int no); |
unsigned long syms_line2val(char *filename, int lnum); |
void syms_listwild(char *pattern, |
void (*handler)(unsigned long addr, char type_c, char *name, char *name2, int lnum)); |
extern int undefined_symbol; |
extern int syms_printwhy; |
#define N_INDR 0x0a |
#define N_SETA 0x14 /* Absolute set element symbol */ |
#define N_SETT 0x16 /* Text set element symbol */ |
#define N_SETD 0x18 /* Data set element symbol */ |
#define N_SETB 0x1A /* Bss set element symbol */ |
#define N_SETV 0x1C /* Pointer to set vector in data area. */ |
#endif |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_syms_h_ */ |
/contrib/media/updf/me/include/debug/tss.h |
---|
0,0 → 1,72 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_tss_h_ |
#define __dj_include_debug_tss_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
typedef struct TSS { |
unsigned short tss_back_link; |
unsigned short res0; |
unsigned long tss_esp0; |
unsigned short tss_ss0; |
unsigned short res1; |
unsigned long tss_esp1; |
unsigned short tss_ss1; |
unsigned short res2; |
unsigned long tss_esp2; |
unsigned short tss_ss2; |
unsigned short res3; |
unsigned long tss_cr3; |
unsigned long tss_eip; |
unsigned long tss_eflags; |
unsigned long tss_eax; |
unsigned long tss_ecx; |
unsigned long tss_edx; |
unsigned long tss_ebx; |
unsigned long tss_esp; |
unsigned long tss_ebp; |
unsigned long tss_esi; |
unsigned long tss_edi; |
unsigned short tss_es; |
unsigned short res4; |
unsigned short tss_cs; |
unsigned short res5; |
unsigned short tss_ss; |
unsigned short res6; |
unsigned short tss_ds; |
unsigned short res7; |
unsigned short tss_fs; |
unsigned short res8; |
unsigned short tss_gs; |
unsigned short res9; |
unsigned short tss_ldt; |
unsigned short res10; |
unsigned short tss_trap; |
unsigned char tss_iomap; |
unsigned char tss_irqn; |
unsigned long tss_error; |
} TSS; |
extern TSS a_tss; |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_tss_h_ */ |
/contrib/media/updf/me/include/debug/v2load.h |
---|
0,0 → 1,48 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_v2load_h_ |
#define __dj_include_debug_v2load_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
#include <setjmp.h> |
typedef struct { |
unsigned first_addr; |
unsigned last_addr; |
} AREAS; |
typedef enum { |
A_text, |
A_data, |
A_bss, |
A_arena, |
A_stack |
} AREA_TYPES; |
#define areas _v2load_areas |
#define MAX_AREA 5 |
extern AREAS areas[MAX_AREA]; |
int v2loadimage(const char *program, const char *cmdline, jmp_buf load_state); |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_v2load_h_ */ |
/contrib/media/updf/me/include/debug/wild.h |
---|
0,0 → 1,28 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#ifndef __dj_include_debug_wild_h_ |
#define __dj_include_debug_wild_h_ |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifndef __dj_ENFORCE_ANSI_FREESTANDING |
#ifndef __STRICT_ANSI__ |
#ifndef _POSIX_SOURCE |
int wild(char *pattern, char *string); |
#endif /* !_POSIX_SOURCE */ |
#endif /* !__STRICT_ANSI__ */ |
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
#ifndef __dj_ENFORCE_FUNCTION_CALLS |
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* !__dj_include_debug_wild_h_ */ |