mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
3051b64489
Fri Jul 5 16:27:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/desktop.c] Use Windows file I/O routines to load the desktop bitmap. * [files/file.c] Implemented RemoveDirectory* and DeleteFile*. * [include/wine.h] Added SIGCONTEXT typedef to replace #define sigcontext_struct. * [loader/task.c] Fixed initial breakpoint setting for Win32 tasks. * [misc/wsprintf.c] Ignore Unicode formats for wsprintf16(). * [objects/font.c] Implemented Win32 version of GetTextMetrics. * [windows/winproc.c] [windows/win.c] [windows/class.c] [windows/dialog.c] Modified windows procedures to use thunks, to ensure that the procedure can be called directly from the Windows program. * [windows/win.c] Added function WIN_BuildWinArray() to make it easier to enumerate windows. Implemented Win32 version of EnumWindows() and friends. Fri Jul 5 11:56:22 1996 Andreas Kirschbaum <ank@rbg.informatik.th-darmstadt.de> * [controls/button.c] [windows/win.c] Operator precedence fixes. * [controls/edit.c] Implemented ES_PASSWORD, ES_LOWERCASE and ES_UPPERCASE styles. Fixed word wrap with long words. * [debugger/debug.l] New alias "where" for command "backtrace". * [if1632/gdi.spec] Corrected parameter of ExtTextOut. * [loader/module.c] Corrected printing of table of modules. * [misc/spy.c] Removed superfluous \n in message name. * [windows/message.c] Declared MSG_SendMessage as static. Changed parameter of DirectedYield() from queue handle to task handle. Removed warning mesages for argument of printf. * [windows/nonclient.c] Added the flag DT_NOPREFIX when drawing window titles. * [windows/win.c] WIN_WalkWindows now prints the invalid window handle. Added a warning if Get-/SetWindowWord/-Long gets an invalid offset. * [windows/winproc.c] Allows creating dialog windows with NULL as dialog function. Wed Jul 3 09:26:41 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [windows/event.c] EVENT_key: Fixes to VK_ code generation for space bar and punctuation. * [files/file.c] GetTempFileName: first character in temporary name is "~". * [memory/heap.c] HEAP_MakeInUseBlockFree now frees the whole subheap if possible. * [objects/text.c] ExtTextOut16(): handle NULL lpRect and ETO_OPAQUE. * [misc/driver.c] Removed some bugs and reformatted. Actually loads drivers now. * [include/callback.h] Added CallDriverProc() and CallWindowsExitProc(). * [loader/module.c] MODULE_CallWEP(): new function. * [misc/lzexpand.c] LZSeek(): return new pointer, not old one. * [misc/ver.c] find_ne_resource(): fixed dependence on LZSeek() bug. GetFileResource(): initialize reslen before using it. * [windows/class.c] SetClassWord(): add missing else. * [objects/font.c] lpFontList is now MAX_FONTS+1. It used to overwrite the array. InitFontList: allocate one huge array of structures. FONT_MatchFont: uppercase the face name. Thu Jun 27 12:41:40 1996 Bruce Milner <bruce@genetics.utah.edu> * [memory/heap.c] Fixed a typo in HeapReAlloc(). Tue Jun 25 22:22:03 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/directory.c] [files/drive.c] [if1632/kernel.spec] [if1632/kernel32.spec] [if1632/shell.spec] [include/windows.h] GetTempPath* added GetDriveType* fixed, updated to NewNameStandard. GetCurrentDirectory* fixed (needs to prepend X:\). * [controls/listbox.c] Missing NULL check added. * [if1632/winmm.spec] [loader/builtin.c] winmm.dll (32bit mmsystem equivalent) specs added. * [memory/string.c] [if1632/kernel32.spec] [include/windows.h] Rtl{Move,Zero,Fill}Memory added. * [misc/registry.c] Some NULL ptr dereference bugs fixed. * [multimedia/mcicda.c][multimedia/mcistring.c][multimedia/mmsystem.c] Check for NULL ptr. Fill mciOpenDrv when mixing mciOpen and mciSendString("open .."). Aliasing should work for all MCI devices. * [windows/win.c] Allow passing invalid window handles to CloseWindow(). Tue Jun 25 20:02:15 1996 Jukka Iivonen <iivonen@cc.helsinki.fi> * [files/directory.c] [if1632/kernel32.spec] GetSystemDirectory32A and GetSystemDirectory32W added. * [misc/main.c] [if1632/kernel32.spec] Beep and SetEnvironmentVariable32W added.
127 lines
4.7 KiB
C
127 lines
4.7 KiB
C
/*
|
|
* Debugger register handling
|
|
*
|
|
* Copyright 1995 Alexandre Julliard
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "debugger.h"
|
|
|
|
|
|
SIGCONTEXT *DEBUG_context;
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
* DEBUG_SetRegister
|
|
*
|
|
* Set a register value.
|
|
*/
|
|
void DEBUG_SetRegister( enum debug_regs reg, int val )
|
|
{
|
|
switch(reg)
|
|
{
|
|
case REG_EAX: EAX_reg(DEBUG_context) = val; break;
|
|
case REG_EBX: EBX_reg(DEBUG_context) = val; break;
|
|
case REG_ECX: ECX_reg(DEBUG_context) = val; break;
|
|
case REG_EDX: EDX_reg(DEBUG_context) = val; break;
|
|
case REG_ESI: ESI_reg(DEBUG_context) = val; break;
|
|
case REG_EDI: EDI_reg(DEBUG_context) = val; break;
|
|
case REG_EBP: EBP_reg(DEBUG_context) = val; break;
|
|
case REG_EFL: EFL_reg(DEBUG_context) = val; break;
|
|
case REG_EIP: EIP_reg(DEBUG_context) = val; break;
|
|
case REG_ESP: ESP_reg(DEBUG_context) = val; break;
|
|
case REG_AX: AX_reg(DEBUG_context) = val; break;
|
|
case REG_BX: BX_reg(DEBUG_context) = val; break;
|
|
case REG_CX: CX_reg(DEBUG_context) = val; break;
|
|
case REG_DX: DX_reg(DEBUG_context) = val; break;
|
|
case REG_SI: SI_reg(DEBUG_context) = val; break;
|
|
case REG_DI: DI_reg(DEBUG_context) = val; break;
|
|
case REG_BP: BP_reg(DEBUG_context) = val; break;
|
|
case REG_FL: FL_reg(DEBUG_context) = val; break;
|
|
case REG_IP: IP_reg(DEBUG_context) = val; break;
|
|
case REG_SP: SP_reg(DEBUG_context) = val; break;
|
|
case REG_CS: CS_reg(DEBUG_context) = val; break;
|
|
case REG_DS: DS_reg(DEBUG_context) = val; break;
|
|
case REG_ES: ES_reg(DEBUG_context) = val; break;
|
|
case REG_SS: SS_reg(DEBUG_context) = val; break;
|
|
}
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* DEBUG_GetRegister
|
|
*
|
|
* Get a register value.
|
|
*/
|
|
int DEBUG_GetRegister( enum debug_regs reg )
|
|
{
|
|
switch(reg)
|
|
{
|
|
case REG_EAX: return EAX_reg(DEBUG_context);
|
|
case REG_EBX: return EBX_reg(DEBUG_context);
|
|
case REG_ECX: return ECX_reg(DEBUG_context);
|
|
case REG_EDX: return EDX_reg(DEBUG_context);
|
|
case REG_ESI: return ESI_reg(DEBUG_context);
|
|
case REG_EDI: return EDI_reg(DEBUG_context);
|
|
case REG_EBP: return EBP_reg(DEBUG_context);
|
|
case REG_EFL: return EFL_reg(DEBUG_context);
|
|
case REG_EIP: return EIP_reg(DEBUG_context);
|
|
case REG_ESP: return ESP_reg(DEBUG_context);
|
|
case REG_AX: return AX_reg(DEBUG_context);
|
|
case REG_BX: return BX_reg(DEBUG_context);
|
|
case REG_CX: return CX_reg(DEBUG_context);
|
|
case REG_DX: return DX_reg(DEBUG_context);
|
|
case REG_SI: return SI_reg(DEBUG_context);
|
|
case REG_DI: return DI_reg(DEBUG_context);
|
|
case REG_BP: return BP_reg(DEBUG_context);
|
|
case REG_FL: return FL_reg(DEBUG_context);
|
|
case REG_IP: return IP_reg(DEBUG_context);
|
|
case REG_SP: return SP_reg(DEBUG_context);
|
|
case REG_CS: return CS_reg(DEBUG_context);
|
|
case REG_DS: return DS_reg(DEBUG_context);
|
|
case REG_ES: return ES_reg(DEBUG_context);
|
|
case REG_SS: return SS_reg(DEBUG_context);
|
|
}
|
|
return 0; /* should not happen */
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
* DEBUG_InfoRegisters
|
|
*
|
|
* Display registers information.
|
|
*/
|
|
void DEBUG_InfoRegisters(void)
|
|
{
|
|
fprintf(stderr,"Register dump:\n");
|
|
|
|
/* First get the segment registers out of the way */
|
|
fprintf( stderr," CS:%04x SS:%04x DS:%04x ES:%04x\n",
|
|
CS_reg(DEBUG_context), SS_reg(DEBUG_context),
|
|
DS_reg(DEBUG_context), ES_reg(DEBUG_context) );
|
|
|
|
if (dbg_mode == 16)
|
|
{
|
|
fprintf( stderr," IP:%04x SP:%04x BP:%04x FLAGS:%04x\n",
|
|
IP_reg(DEBUG_context), SP_reg(DEBUG_context),
|
|
BP_reg(DEBUG_context), FL_reg(DEBUG_context) );
|
|
fprintf( stderr," AX:%04x BX:%04x CX:%04x DX:%04x SI:%04x DI:%04x\n",
|
|
AX_reg(DEBUG_context), BX_reg(DEBUG_context),
|
|
CX_reg(DEBUG_context), DX_reg(DEBUG_context),
|
|
SI_reg(DEBUG_context), DI_reg(DEBUG_context) );
|
|
}
|
|
else /* 32-bit mode */
|
|
{
|
|
fprintf( stderr, " EIP:%08lx ESP:%08lx EBP:%08lx EFLAGS:%08lx\n",
|
|
EIP_reg(DEBUG_context), ESP_reg(DEBUG_context),
|
|
EBP_reg(DEBUG_context), EFL_reg(DEBUG_context) );
|
|
fprintf( stderr, " EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n",
|
|
EAX_reg(DEBUG_context), EBX_reg(DEBUG_context),
|
|
ECX_reg(DEBUG_context), EDX_reg(DEBUG_context) );
|
|
fprintf( stderr, " ESI:%08lx EDI:%08lx\n",
|
|
ESI_reg(DEBUG_context), EDI_reg(DEBUG_context) );
|
|
}
|
|
}
|
|
|