
Sun Apr 14 12:51:27 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/menu.c] [include/dialog.h] [windows/dialog.c] Made the resource loading code always use the correct Windows layout for Winelib on other CPUs. * [include/module.h] [loader/module.c] Added self handle in NE_MODULE structure, so we can use a pointer instead of a handle. Added function MODULE_GetPtr() to validate a HMODULE. * [memory/heap.c] Implemented Win32 heap management. * [memory/selector.c] Fix selector limit for huge blocks. Sat Apr 13 00:19:12 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk> * [objects/metafile.c] Fixed memcpy bug to allow memory based metafiles to work. Fri Apr 12 19:25:41 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Complete rewrite. Everything changed: new features, new bugs. Main addition: WordWrap. Fri Apr 12 20:29:55 1996 Tristan Tarrant <tst@dcs.ed.ac.uk> * [resources/sysres_It.rc] Fixed a few mistakes in the file and resized some of the controls. Fri Apr 12 09:55:13 1996 John Harvey <john@division.co.uk> * [misc/winsocket.c] Fixed broken #if defined that stopped unixware compiling. * [win32/resource.c] Added missing return to end of FindResource32. Thu Apr 11 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [windows/keyboard.c] [windows/event.c] Fixed GetKeyState for mouse buttons. * [windows/message.c] WM_MOUSEACTIVATE wasn't sent in some cases. Wed Apr 10 18:59:53 1996 Niels de Carpentier <niels@cindy.et.tudelft.nl> * [objects/font.c] Match slightly bigger font if height negative. Mon Apr 8 13:46:15 1996 Deano Calver <deano@rattie.demon.co.uk> * [multimedia/mmsystem.c] Changed read's to FILE_read's in mmsystem to fix mmio bug. Sun Apr 7 21:40:29 1996 Albrecht Kleine <kleine@ak.sax.de> * [misc/commdlg.c] [resources/sysres_En.rc] [resources/sysres_De.rc] Introduced ColorDlgProc() for ChooseColor() and replaced fitting En-,De- resources. As written in TODO: some national language support is needed here.
118 lines
3.8 KiB
C
118 lines
3.8 KiB
C
/*
|
|
* Debugger definitions
|
|
*
|
|
* Copyright 1995 Alexandre Julliard
|
|
*/
|
|
|
|
#ifndef DEBUGGER_H
|
|
#define DEBUGGER_H
|
|
|
|
#include "ldt.h"
|
|
#include "registers.h"
|
|
#include "wine.h"
|
|
|
|
#define STEP_FLAG 0x100 /* single step flag */
|
|
|
|
typedef struct
|
|
{
|
|
DWORD seg; /* 0xffffffff means current default segment (cs or ds) */
|
|
DWORD off;
|
|
} DBG_ADDR;
|
|
|
|
#define DBG_FIX_ADDR_SEG(addr,default) \
|
|
{ if ((addr)->seg == 0xffffffff) (addr)->seg = (default); \
|
|
if (((addr)->seg == WINE_CODE_SELECTOR) || \
|
|
(addr)->seg == WINE_DATA_SELECTOR) (addr)->seg = 0; }
|
|
|
|
#define DBG_ADDR_TO_LIN(addr) \
|
|
((addr)->seg ? (char *)PTR_SEG_OFF_TO_LIN((addr)->seg,(addr)->off) \
|
|
: (char *)(addr)->off)
|
|
|
|
#define DBG_CHECK_READ_PTR(addr,len) \
|
|
(!DEBUG_IsBadReadPtr((addr),(len)) || \
|
|
(fprintf(stderr,"*** Invalid address "), \
|
|
DEBUG_PrintAddress((addr),dbg_mode), \
|
|
fprintf(stderr,"\n"),0))
|
|
|
|
#define DBG_CHECK_WRITE_PTR(addr,len) \
|
|
(!DEBUG_IsBadWritePtr((addr),(len)) || \
|
|
(fprintf(stderr,"*** Invalid address "), \
|
|
DEBUG_PrintAddress(addr,dbg_mode), \
|
|
fprintf(stderr,"\n"),0))
|
|
|
|
#ifdef REG_SP /* Some Sun includes define this */
|
|
#undef REG_SP
|
|
#endif
|
|
|
|
enum debug_regs
|
|
{
|
|
REG_EAX, REG_EBX, REG_ECX, REG_EDX, REG_ESI,
|
|
REG_EDI, REG_EBP, REG_EFL, REG_EIP, REG_ESP,
|
|
REG_AX, REG_BX, REG_CX, REG_DX, REG_SI,
|
|
REG_DI, REG_BP, REG_FL, REG_IP, REG_SP,
|
|
REG_CS, REG_DS, REG_ES, REG_SS
|
|
};
|
|
|
|
|
|
enum exec_mode
|
|
{
|
|
EXEC_CONT, /* Continuous execution */
|
|
EXEC_STEP_OVER, /* Stepping over a call */
|
|
EXEC_STEP_INSTR /* Single-stepping an instruction */
|
|
};
|
|
|
|
extern struct sigcontext_struct *DEBUG_context; /* debugger/registers.c */
|
|
extern unsigned int dbg_mode;
|
|
|
|
/* debugger/break.c */
|
|
extern void DEBUG_SetBreakpoints( BOOL set );
|
|
extern int DEBUG_FindBreakpoint( const DBG_ADDR *addr );
|
|
extern void DEBUG_AddBreakpoint( const DBG_ADDR *addr );
|
|
extern void DEBUG_DelBreakpoint( int num );
|
|
extern void DEBUG_EnableBreakpoint( int num, BOOL enable );
|
|
extern void DEBUG_InfoBreakpoints(void);
|
|
extern BOOL DEBUG_HandleTrap( struct sigcontext_struct *context );
|
|
extern BOOL DEBUG_ShouldContinue( struct sigcontext_struct *context,
|
|
enum exec_mode mode );
|
|
extern void DEBUG_RestartExecution( struct sigcontext_struct *context,
|
|
enum exec_mode mode, int instr_len );
|
|
|
|
/* debugger/db_disasm.c */
|
|
extern void DEBUG_Disasm( DBG_ADDR *addr );
|
|
|
|
/* debugger/hash.c */
|
|
extern void DEBUG_AddSymbol( const char *name, const DBG_ADDR *addr );
|
|
extern BOOL DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr );
|
|
extern BOOL DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr );
|
|
extern const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr );
|
|
extern void DEBUG_ReadSymbolTable( const char * filename );
|
|
extern void DEBUG_LoadEntryPoints(void);
|
|
|
|
/* debugger/info.c */
|
|
extern void DEBUG_Print( const DBG_ADDR *addr, int count, char format );
|
|
extern void DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen );
|
|
extern void DEBUG_Help(void);
|
|
extern void DEBUG_List( DBG_ADDR *addr, int count );
|
|
|
|
/* debugger/memory.c */
|
|
extern BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size );
|
|
extern BOOL DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size );
|
|
extern int DEBUG_ReadMemory( const DBG_ADDR *address );
|
|
extern void DEBUG_WriteMemory( const DBG_ADDR *address, int value );
|
|
extern void DEBUG_ExamineMemory( const DBG_ADDR *addr, int count, char format);
|
|
|
|
/* debugger/registers.c */
|
|
extern void DEBUG_SetRegister( enum debug_regs reg, int val );
|
|
extern int DEBUG_GetRegister( enum debug_regs reg );
|
|
extern void DEBUG_InfoRegisters(void);
|
|
|
|
/* debugger/stack.c */
|
|
extern void DEBUG_InfoStack(void);
|
|
extern void DEBUG_BackTrace(void);
|
|
|
|
/* debugger/dbg.y */
|
|
extern void DEBUG_EnterDebugger(void);
|
|
extern void wine_debug( int signal, struct sigcontext_struct * regs );
|
|
|
|
#endif /* DEBUGGER_H */
|