Release 970112

Sat Jan 11 18:17:59 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/menu.c]
	Updated to new Win32 types.

	* [controls/listbox.c]
	Fixed Winfile extended selection bug.

	* [files/directory.c]
	Changed DIR_SearchPath to return both long and short file names.

	* [files/dos_fs.c]
	Implemented VFAT ioctl to retrieve the original short filenames
	from a VFAT filesystem (Linux only for now).
	Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by
	DOS_GetFullName().
	Properly implemented GetShortPathName() and GetFullPathName().
	Made all functions re-entrant.

	* [files/file.c] [misc/main.c]
	Replaced -allowreadonly option by -failreadonly. The default is
	now to report success when opening a read-only file for writing.

	* [objects/metafile.c]
	Fixed bug in DIB bitmaps pointer calculation.

	* [scheduler/process.c]
	Implemented environment strings and Get/SetStdHandle with process
 	environment block.

	* [tools/build.c]
	Rewrote BuildContext32() to avoid instructions that may not be
	supported by all assemblers.
	
Fri Jan 10 17:11:09 1997  David Faure  <david.faure@ifhamy.insa-lyon.fr>

	* [windows/event.c]
	Created table keyc2vkey, which associate a vkey(+extended bit) to
	any keycode. Changed EVENT_event_to_vkey to use this table to
	return the correct vkey. Changed EVENT_ToAscii to get the keycode
	from this table too.  Assigned OEM specific vkeys arbitrarily.

Fri Jan 10 09:26:17 1997  John Harvey <john@division.co.uk>

	* [misc/winsock.c] [misc/winsoc_async.c]
        Fixed svr4 header files.
        Changed bzero() to memset().

	* [tools/fnt2bdf.c]
        Removed bcopy() and used memcpy() instead.

	* [debugger/msc.c]
        Include string.h instead of strings.h

	* [debugger/stabs.c]
        Include string.h instead of strings.h.
        Define __ELF__ for svr4 systems.

	* [loader/signal.c]
        Use wait() instead of wait4() which doesnt exist on Unixware.

	* [memory/global.c]
        Use sysconf() instead of getpagesize() for svr4 systems.

Thu Jan  9 21:07:20 1997  Robert Pouliot <krynos@clic.net>

	* [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in]
	  [tools/Makefile.in] [documentation/wine_os2.txt]
	Patches for OS/2 support. Note that it doesn't compile yet.

Tue Jan  7 20:03:53 1997  Eric Youngdale <eric@sub2304.jic.com>

	* [debugger/*]
	Many more debugger improvements (see debugger/README for details).

Tue Jan  7 15:12:21 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [windows/graphics.c] [objects/text.c] [graphics/x11drv/*]
	  [graphics/metafiledrv/*]
	Moved some device dependent code into the resp. subdirs.

	* [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h]
	Prototypes added,
	DC_FUNCTIONS: GetPixel added, some unnecessary functions removed.

	* [objects/region.c]
	CreatePolyPolygonRgn32 added.

	* [files/dos_fs.c]
	QueryDosDevice added.

	* [misc/lstr.c]
	FormatMessage: broken heap management fixed.

	* [scheduler/process.c] [scheduler/thread.c]
	Get/SetThreadPriority/PriorityClass added.

Mon Jan  6 21:55:30 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>

	* [misc/keyboard.c]
	ToAscii : Use EVENT_ToAscii instead.

	* [windows/event.c]
	keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize
	keypad cursor keys.
	EVENT_event_to_vkey : New function, to transform a X keycode
	into a MSwin vkey + extended bit.
	EVENT_ToAscii : New function, to transform a vkey + extended bit
	(+ key state table) into ascii char(s), using XLookupString, and
	recognizing dead chars.
	EVENT_key : Transform AltGr into Ctrl+Alt sequence; call
	EVENT_event_to_vkey for keycode to vkey conversion; fixed
	previous, context and extended bits.

	* [windows/keyboard.c]
	Include stddebug.h, to get -debugmsg messages.
	GetKeyState : Handle VK_MBUTTON case.
	GetKeyboardState, SetKeyboardState : Debugging messages added.

	* [windows/message.c]
	TranslateMessage : Handle dead chars.

Mon Jan  6 20:10:11 1997  Dominik Strasser  <bm424953@muenchen.org>

	* [if1632/crtdll.spec] [misc/crtdll.c]
	C++ functions new/delete/set_new_handler implemented.

Mon Jan  6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>

	* [controls/edit.c] [include/windows.h]
	Moved the edit control to 32 bits.
	Included new (win95) message definitions in windows.h
	Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS,
	EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS.
	Broke EM_SETWORDBREAKPROC (internal wordwrap still works).
	Fixed some bugs, introduced a couple of others.
	Text buffer is now initially in 32-bit heap.

	* [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c]
	  [if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c]
	  [misc/commdlg.c]
	Updated to work with 32-bit edit control.

Sat Jan  4 22:07:27 1997  O.Flebbe  <O.Flebbe@science-computing.uni-tuebingen.de>

	* [loader/pe_image.c]
	Use mmap rather then malloc. Better workaround for clean
	segments.
diff --git a/include/debugger.h b/include/debugger.h
index 5a69215..13779d0 100644
--- a/include/debugger.h
+++ b/include/debugger.h
@@ -14,17 +14,58 @@
 
 #define STEP_FLAG 0x100 /* single step flag */
 
+#define SYM_FUNC	 0x0
+#define SYM_DATA	 0x1
+#define SYM_WIN32	 0x2
+#define SYM_WINE	 0x4
+#define SYM_INVALID	 0x8
+#define SYM_TRAMPOLINE	 0x10
+#define SYM_STEP_THROUGH 0x20
+
+enum	debug_type {BASIC, CONST, POINTER, ARRAY, STRUCT, ENUM, TYPEDEF, FUNC, BITFIELD};
+
+
+/*
+ * Return values for DEBUG_CheckLinenoStatus.  Used to determine
+ * what to do when the 'step' command is given.
+ */
+#define FUNC_HAS_NO_LINES	(0)
+#define NOT_ON_LINENUMBER	(1)
+#define AT_LINENUMBER		(2)
+#define FUNC_IS_TRAMPOLINE	(3)
+
+/*
+ * For constants generated by the parser, we use this datatype
+ */
+extern struct datatype * DEBUG_TypeInt;
+extern struct datatype * DEBUG_TypeIntConst;
+extern struct datatype * DEBUG_TypeUSInt;
+extern struct datatype * DEBUG_TypeString;
+
 typedef struct
 {
+    struct datatype * type;
     DWORD seg;  /* 0xffffffff means current default segment (cs or ds) */
     DWORD off;
 } DBG_ADDR;
 
+struct list_id
+{
+    char * sourcefile;
+    int    line;
+};
+
 struct  wine_lines {
   unsigned long		line_number;
   DBG_ADDR		pc_offset;
 };
 
+struct symbol_info
+{
+  struct name_hash * sym;
+  struct list_id     list;
+};
+
 typedef struct wine_lines WineLineNo;
 
 /*
@@ -34,30 +75,15 @@
  */
 struct  wine_locals {
   unsigned int		regno:8;	/* For register symbols */
-  unsigned int		offset:24;	/* offset from esp/ebp to symbol */
+  signed int		offset:24;	/* offset from esp/ebp to symbol */
   unsigned int		pc_start;	/* For RBRAC/LBRAC */
   unsigned int		pc_end;		/* For RBRAC/LBRAC */
   char		      * name;		/* Name of symbol */
+  struct datatype     * type;		/* Datatype of symbol */
 };
 
 typedef struct wine_locals WineLocals;
 
-struct name_hash
-{
-    struct name_hash * next;
-    char *             name;
-    char *             sourcefile;
-
-    int		       n_locals;
-    int		       locals_alloc;
-    WineLocals       * local_vars;
-  
-    int		       n_lines;
-    int		       lines_alloc;
-    WineLineNo       * linetab;
-
-    DBG_ADDR           addr;
-};
 
 #define DBG_FIX_ADDR_SEG(addr,default) \
     { if ((addr)->seg == 0xffffffff) (addr)->seg = (default); \
@@ -97,8 +123,16 @@
 enum exec_mode
 {
     EXEC_CONT,       /* Continuous execution */
-    EXEC_STEP_OVER,  /* Stepping over a call */
-    EXEC_STEP_INSTR  /* Single-stepping an instruction */
+    EXEC_STEP_OVER,  /* Stepping over a call to next source line */
+    EXEC_STEP_INSTR,  /* Step to next source line, stepping in if needed */
+    EXEC_STEPI_OVER,  /* Stepping over a call */
+    EXEC_STEPI_INSTR,  /* Single-stepping an instruction */
+    EXEC_FINISH,		/* Step until we exit current frame */
+    EXEC_STEP_OVER_TRAMPOLINE  /* Step over trampoline.  Requires that
+				* we dig the real return value off the stack
+				* and set breakpoint there - not at the
+				* instr just after the call.
+				*/
 };
 
 extern CONTEXT DEBUG_context;  /* debugger/registers.c */
@@ -112,40 +146,91 @@
 extern void DEBUG_EnableBreakpoint( int num, BOOL32 enable );
 extern void DEBUG_InfoBreakpoints(void);
 extern BOOL32 DEBUG_HandleTrap(void);
-extern BOOL32 DEBUG_ShouldContinue( enum exec_mode mode );
-extern void DEBUG_RestartExecution( enum exec_mode mode, int instr_len );
+extern BOOL32 DEBUG_ShouldContinue( enum exec_mode mode, int * count );
+extern enum exec_mode DEBUG_RestartExecution( enum exec_mode mode, int count );
+extern BOOL32 DEBUG_IsFctReturn(void);
 
   /* debugger/db_disasm.c */
-extern void DEBUG_Disasm( DBG_ADDR *addr );
+extern void DEBUG_Disasm( DBG_ADDR *addr, int display );
+
+  /* debugger/expr.c */
+extern void DEBUG_FreeExprMem(void);
+struct expr * DEBUG_RegisterExpr(enum debug_regs);
+struct expr * DEBUG_SymbolExpr(const char * name);
+struct expr * DEBUG_ConstExpr(int val);
+struct expr * DEBUG_StringExpr(const char * str);
+struct expr * DEBUG_SegAddr(struct expr *, struct expr *);
+struct expr * DEBUG_USConstExpr(unsigned int val);
+struct expr * DEBUG_BinopExpr(int oper, struct expr *, struct expr *);
+struct expr * DEBUG_UnopExpr(int oper, struct expr *);
+struct expr * DEBUG_StructPExpr(struct expr *, const char * element);
+struct expr * DEBUG_StructExpr(struct expr *, const char * element);
+struct expr * DEBUG_ArrayExpr(struct expr *, struct expr * index);
+struct expr * DEBUG_CallExpr(const char *, int nargs, ...);
+extern   int  DEBUG_ExprValue(DBG_ADDR *, unsigned int *);
+DBG_ADDR DEBUG_EvalExpr(struct expr *);
+extern int DEBUG_AddDisplay(struct expr * exp);
+extern int DEBUG_DelDisplay(int displaynum);
+extern struct expr * DEBUG_CloneExpr(struct expr * exp);
+extern int DEBUG_FreeExpr(struct expr * exp);
+extern int DEBUG_DisplayExpr(struct expr * exp);
+
+  /* more debugger/break.c */
+extern int DEBUG_AddBPCondition(int bpnum, struct expr * exp);
+
+  /* debugger/display.c */
+extern int DEBUG_DoDisplay(void);
+extern int DEBUG_AddDisplay(struct expr * exp);
+extern int DEBUG_DoDisplay(void);
+extern int DEBUG_DelDisplay(int displaynum);
+extern int DEBUG_InfoDisplay(void);
 
   /* debugger/hash.c */
 extern struct name_hash * DEBUG_AddSymbol( const char *name, 
 					   const DBG_ADDR *addr,
+					   const char * sourcefile,
+					   int flags);
+extern struct name_hash * DEBUG_AddInvSymbol( const char *name, 
+					   const DBG_ADDR *addr,
 					   const char * sourcefile);
 extern BOOL32 DEBUG_GetSymbolValue( const char * name, const int lineno,
-				    DBG_ADDR *addr );
+				    DBG_ADDR *addr, int );
 extern BOOL32 DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr );
 extern const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
 					     struct name_hash ** rtn,
-					     unsigned int ebp);
+					     unsigned int ebp,
+					     struct list_id * source);
 extern void DEBUG_ReadSymbolTable( const char * filename );
 extern void DEBUG_LoadEntryPoints(void);
 extern void DEBUG_AddLineNumber( struct name_hash * func, int line_num, 
 		     unsigned long offset );
-extern void DEBUG_AddLocal( struct name_hash * func, int regno, 
+extern struct wine_locals *
+            DEBUG_AddLocal( struct name_hash * func, int regno, 
 			    int offset,
 			    int pc_start,
 			    int pc_end,
 			    char * name);
+extern int DEBUG_CheckLinenoStatus(const DBG_ADDR *addr);
+extern void DEBUG_GetFuncInfo(struct list_id * ret, const char * file, 
+			      const char * func);
+extern int DEBUG_SetSymbolSize(struct name_hash * sym, unsigned int len);
+extern int DEBUG_SetSymbolBPOff(struct name_hash * sym, unsigned int len);
+extern int DEBUG_GetSymbolAddr(struct name_hash * sym, DBG_ADDR * addr);
+extern int DEBUG_cmp_sym(const void * p1, const void * p2);
+extern BOOL32 DEBUG_GetLineNumberAddr( struct name_hash *, const int lineno, 
+				DBG_ADDR *addr, int bp_flag );
 
+extern int DEBUG_SetLocalSymbolType(struct wine_locals * sym, 
+				    struct datatype * type);
+BOOL32 DEBUG_Normalize(struct name_hash * nh );
 
   /* debugger/info.c */
-extern void DEBUG_Print( const DBG_ADDR *addr, int count, char format );
-extern struct name_hash * DEBUG_PrintAddress( const DBG_ADDR *addr, 
+extern void DEBUG_PrintBasic( const DBG_ADDR *addr, int count, char format );
+extern struct symbol_info DEBUG_PrintAddress( const DBG_ADDR *addr, 
 					      int addrlen, int flag );
 extern void DEBUG_Help(void);
-extern void DEBUG_List( DBG_ADDR *addr, int count );
-extern struct name_hash * DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr, 
+extern void DEBUG_HelpInfo(void);
+extern struct symbol_info DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr, 
 						     int addrlen, 
 						     unsigned int ebp, 
 						     int flag );
@@ -164,13 +249,17 @@
 extern BOOL32 DEBUG_ValidateRegisters(void);
 extern void DEBUG_SetSigContext( const SIGCONTEXT *sigcontext );
 extern void DEBUG_GetSigContext( SIGCONTEXT *sigcontext );
+extern int DEBUG_PrintRegister(enum debug_regs reg);
 
   /* debugger/stack.c */
 extern void DEBUG_InfoStack(void);
 extern void DEBUG_BackTrace(void);
-extern BOOL32 DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr );
+extern void DEBUG_SilentBackTrace(void);
 extern int  DEBUG_InfoLocals(void);
 extern int  DEBUG_SetFrame(int newframe);
+extern int  DEBUG_GetCurrentFrame(struct name_hash ** name, 
+				  unsigned int * eip,
+				  unsigned int * ebp);
 
   /* debugger/stabs.c */
 extern int DEBUG_ReadExecutableDbgInfo(void);
@@ -179,6 +268,42 @@
 extern int DEBUG_RegisterDebugInfo(int, struct pe_data *pe,
 				   int, unsigned long, unsigned long);
 extern int DEBUG_ProcessDeferredDebug(void);
+extern int DEBUG_RegisterELFDebugInfo(int load_addr, u_long size, char * name);
+extern void DEBUG_InfoShare(void);
+extern void DEBUG_InitCVDataTypes(void);
+
+  /* debugger/types.c */
+extern void DEBUG_InitTypes(void);
+extern struct datatype * DEBUG_NewDataType(enum debug_type xtype, 
+					   const char * typename);
+extern unsigned int 
+DEBUG_TypeDerefPointer(DBG_ADDR * addr, struct datatype ** newtype);
+extern int DEBUG_AddStructElement(struct datatype * dt, 
+				  char * name, struct datatype * type, 
+				  int offset, int size);
+extern int DEBUG_SetStructSize(struct datatype * dt, int size);
+extern int DEBUG_SetPointerType(struct datatype * dt, struct datatype * dt2);
+extern int DEBUG_SetArrayParams(struct datatype * dt, int min, int max,
+				struct datatype * dt2);
+extern void DEBUG_Print( const DBG_ADDR *addr, int count, char format, int level );
+extern unsigned int DEBUG_FindStructElement(DBG_ADDR * addr, 
+					    const char * ele_name, int * tmpbuf);
+extern struct datatype * DEBUG_GetPointerType(struct datatype * dt);
+extern int DEBUG_GetObjectSize(struct datatype * dt);
+extern unsigned int DEBUG_ArrayIndex(DBG_ADDR * addr, DBG_ADDR * result, int index);
+extern struct datatype * DEBUG_FindOrMakePointerType(struct datatype * reftype);
+extern long long int DEBUG_GetExprValue(DBG_ADDR * addr, char ** format);
+extern int DEBUG_SetBitfieldParams(struct datatype * dt, int offset, 
+				   int nbits, struct datatype * dt2);
+extern int DEBUG_CopyFieldlist(struct datatype * dt, struct datatype * dt2);
+
+
+  /* debugger/source.c */
+extern void DEBUG_ShowDir(void);
+extern void DEBUG_AddPath(const char * path);
+extern void DEBUG_List(struct list_id * line1, struct list_id * line2,  
+		       int delta);
+extern void DEBUG_NukePath(void);
 
   /* debugger/dbg.y */
 extern void DEBUG_EnterDebugger(void);