1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00
wine/include/debugger.h
Alexandre Julliard b817f4fbb5 Release 960314
Wed Mar 13 19:46:50 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/edit.c]
	Removed calls to memmove (not portable).

	* [debugger/dbg.y] [debugger/debug.l]
	Prefixed all token with 't' to avoid conflicts with type
	definitions.
	Added 'walk queue', 'walk class' and 'info class' commands.

	* [debugger/info.c]
	Moved queue and window information functions to windows/queue.c
	and windows/win.c respectively.

	* [loader/signal.c]
	Added SIGHUP handling to force entry into built-in debugger.
	Cleaned up a bit.

	* [misc/spy.c]
	General cleanup and performance improvements.

	* [windows/class.c]
	Added CLASS_DumpClass() and CLASS_WalkClasses() functions for
	debugger.

	* [windows/event.c]
	Pressing Ctrl-Alt-Return forces an entry into the debugger. Not
	sure if this key combination is a good choice...

	* [windows/message.c] [windows/queue.c] (New file)
	Moved message queue handling functions to windows/queue.c.

Tue Mar 12 14:55:16 1996  Onno Hovers  <onno@stack.urc.tue.nl>

	* [if1632/except.S] [include/except.h] [win32/except.c] (New files)
	Implemented Win32 exception functions: RaiseException(),
 	RtlUnwind(), SetUnhandledExceptionFilter() and
	UnhandledExceptionFilter().

Mon Mar 11 19:23:29 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [controls/listbox.c] [include/listbox.h]
	Special handling for COMBOLBOX styles introduced via extension of
 	HEADLIST structure: lphl->dwStyle.

Mon Mar 11 13:31:06 1996  Greg Kreider <kreider@natlab.research.philips.com>

	* [controls/combo.c]
	Any mouse movement within a small distance (defined by CBLMM_EDGE)
	of the top or bottom edge causes the window to scroll.  Also moved 
	some assignments so the routine works correctly.

	* [controls/listbox.c]
	Changing selection in ListBoxSetCurSel now updates PrevFocused.
	Added to LBSetFont and CreateListBoxStruct a fake hdc that tests 
	and sets the standard text height.

Sun Mar 10 08:39:23 1996  Alex Korobka <alex@phm30.pharm.sunysb.edu>

	* [windows/dce.c]
	Fixed memory leak in DCE_ClipWindows().
1996-03-14 18:08:34 +00:00

112 lines
3.7 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))
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 wine_debug( int signal, struct sigcontext_struct * regs );
#endif /* DEBUGGER_H */