1993-09-29 13:21:49 +01:00
|
|
|
/*
|
|
|
|
* Wine debugger utility routines
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
*
|
|
|
|
* Copyright 1993 Eric Youngdale
|
|
|
|
* Copyright 1995 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1993-09-29 13:21:49 +01:00
|
|
|
*/
|
|
|
|
|
1999-02-28 20:59:00 +01:00
|
|
|
#include "config.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
|
Release 941122
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [controls/scroll.c] [include/scroll.h]
Rewritten most of scroll-bar code for better Windows look & feel.
Implemented EnableScrollBar().
Preliminary keyboard support.
* [objects/bitblt.c]
Fixed BadMatch error for BitBlt() and StretchBlt() when reading
bits from outside the visible region.
* [objects/oembitmap.c] [include/bitmaps/obm_*]
Use XPM symbolic colors to load bitmaps. This allows the colors
of the bitmaps to depend on the system colors.
* [tools/make_debug]
Made the make_debug script more robust.
* [windows/dialog.c]
Fixed CheckRadioButton().
* [windows/nonclient.c]
A few changes to scroll-bar drawing and tracking.
* [windows/winpos.c]
Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to
avoid confusion, and optimized it somewhat.
Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca)
* [misc/audio.c]
* [misc/mcianim.c]
more coding but nothing spectacular.
* [misc/mmaux.c]
some coding to access '/dev/mixer'.
* [misc/midi.c]
some coding to read .MID files, but it's not playing yet.
Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk)
* [objects/dib.c]
Reimplemented DIB_SetImageBits_RLE8() so that it would cope with
bitmaps which don't end 0x00, 0x02 (previously it blew up). This
includes some bitmaps output by Paint Shop Pro. Implementation is
possibly now too lax. Please see the notes on the function about
why.
* [controls/desktop.c]
The desktop pattern should be painted if the wallpaper doesn't
cover the whole screen width OR the whole screen height.
Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl>
* [objects/dib.c]
Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp
now work.
* [loader/ne_resource.c] [include/resource.h]
Some cleanup.
Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu)
* [Configure]
[rc/sysres.rc]
Primitive compile-time support for multiple languages
* [rc/sysres_De.rc]
New file
* [loader/resource.c]
LoadBitmap: Recognize end of sysresbm properly
* [rc/Imakefile]
Rules to compile resources simplified, dependencies changed
* [rc/sysresbm.rc]
Don't use sysresbm if using XPM
* [windows/dialog.c]
CreateDialogIndirectParam: Reverse Z-order of controls
* [windows/message.c]
MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling
* [windows/winpos.c]
NextWindowFromPoint: New function
* [controls/button.c]
WM_NCHITTEST: Group Box is HTTRANSPARENT
BUTTON_CheckAutoRadioButton: New function
BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton
Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com)
* [objects/text.c]
Fix hang when using DrawText(..., DT_WORDBREAK) with a word that
is too long to break.
* [objects/font.c]
Don't assume helvetica if there is no font family; let the other
font attributes decide what font to use.
* [controls/widgets.c]
Listboxes and combo boxes need to be notified of double-clicks.
* [controls/listbox.c]
[include/listbox.h]
scrolling to bottom of list box should display last item at the
bottom, not at the top.
list boxes need to allocate a separate heap for their item data,
rather than using the user heap. Otherwise, it's very easy to run
out of memory for list box items.
removed redundant code in ListBoxAddString(). Implemented simple
version of LBS_SORT.
Don't put [.] in the list box when using DDL_DIRECTORY.
* [controls/combo.c]
Combos should pass CBS_SORT onto their list box.
* [windows/win.c]
If window creation is aborted, remove the window from the
linked lists.
* [controls/static.c]
static controls with SS_ICON were always returning 0 from
WM_NCCREATE.
Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
|
|
|
#include <stdlib.h>
|
2004-06-04 02:59:16 +02:00
|
|
|
#include <stdio.h>
|
2000-03-15 20:57:20 +01:00
|
|
|
#include <string.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
#include "debugger.h"
|
2000-03-08 17:44:54 +01:00
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
2000-04-16 21:46:35 +02:00
|
|
|
#include "tlhelp32.h"
|
2003-12-15 20:53:08 +01:00
|
|
|
#include "wine/debug.h"
|
2010-11-21 22:19:40 +01:00
|
|
|
#include "wine/exception.h"
|
2003-12-15 20:53:08 +01:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
|
1993-09-29 13:21:49 +01:00
|
|
|
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
/***********************************************************************
|
2004-06-04 02:59:16 +02:00
|
|
|
* print_help
|
|
|
|
*
|
|
|
|
* Implementation of the 'help' command.
|
|
|
|
*/
|
|
|
|
void print_help(void)
|
|
|
|
{
|
|
|
|
int i = 0;
|
|
|
|
static const char * const helptext[] =
|
|
|
|
{
|
|
|
|
"The commands accepted by the Wine debugger are a reasonable",
|
|
|
|
"subset of the commands that gdb accepts.",
|
|
|
|
"The commands currently are:",
|
|
|
|
" help quit",
|
2013-09-02 11:09:01 +02:00
|
|
|
" attach <wpid> detach",
|
2010-12-05 17:35:55 +01:00
|
|
|
" break [*<addr>] watch | rwatch *<addr>",
|
2004-06-04 02:59:16 +02:00
|
|
|
" delete break bpnum disable bpnum",
|
|
|
|
" enable bpnum condition <bpnum> [<expr>]",
|
|
|
|
" finish cont [N]",
|
|
|
|
" step [N] next [N]",
|
|
|
|
" stepi [N] nexti [N]",
|
|
|
|
" x <addr> print <expr>",
|
|
|
|
" display <expr> undisplay <disnum>",
|
|
|
|
" local display <expr> delete display <disnum>",
|
|
|
|
" enable display <disnum> disable display <disnum>",
|
2005-02-14 12:04:15 +01:00
|
|
|
" bt [<tid>|all] frame <n>",
|
2004-06-04 02:59:16 +02:00
|
|
|
" up down",
|
|
|
|
" list <lines> disassemble [<addr>][,<addr>]",
|
|
|
|
" show dir dir <path>",
|
|
|
|
" set <reg> = <expr> set *<addr> = <expr>",
|
2006-06-05 18:58:00 +02:00
|
|
|
" pass whatis",
|
2019-11-16 12:39:30 +01:00
|
|
|
" info (see 'help info' for options) thread <tid>",
|
2004-06-04 02:59:16 +02:00
|
|
|
|
|
|
|
"The 'x' command accepts repeat counts and formats (including 'i') in the",
|
|
|
|
"same way that gdb does.\n",
|
|
|
|
|
|
|
|
"The following are examples of legal expressions:",
|
|
|
|
" $eax $eax+0x3 0x1000 ($eip + 256) *$eax *($esp + 3)",
|
|
|
|
" Also, a nm format symbol table can be read from a file using the",
|
|
|
|
" symbolfile command.", /* Symbols can also be defined individually with",
|
|
|
|
" the define command.", */
|
|
|
|
"",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
while (helptext[i]) dbg_printf("%s\n", helptext[i++]);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* info_help
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
*
|
2004-06-04 02:59:16 +02:00
|
|
|
* Implementation of the 'help info' command.
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
*/
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_help(void)
|
1995-03-19 18:39:39 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
int i = 0;
|
|
|
|
static const char * const infotext[] =
|
|
|
|
{
|
|
|
|
"The info commands allow you to get assorted bits of interesting stuff",
|
|
|
|
"to be displayed. The options are:",
|
|
|
|
" info break Displays information about breakpoints",
|
|
|
|
" info class <name> Displays information about window class <name>",
|
|
|
|
" info display Shows auto-display expressions in use",
|
|
|
|
" info except <pid> Shows exception handler chain (in a given process)",
|
|
|
|
" info locals Displays values of all local vars for current frame",
|
|
|
|
" info maps <pid> Shows virtual mappings (in a given process)",
|
|
|
|
" info process Shows all running processes",
|
2006-03-21 13:54:41 +01:00
|
|
|
" info reg Displays values of the general registers at top of stack",
|
|
|
|
" info all-reg Displays the general and floating point registers",
|
2004-06-04 02:59:16 +02:00
|
|
|
" info segments <pid> Displays information about all known segments",
|
|
|
|
" info share Displays all loaded modules",
|
|
|
|
" info share <addr> Displays internal module state",
|
2010-05-25 00:48:36 +02:00
|
|
|
" info stack [<len>] Dumps information about top of stack, up to len words",
|
2004-06-04 02:59:16 +02:00
|
|
|
" info symbol <sym> Displays information about a given symbol",
|
|
|
|
" info thread Shows all running threads",
|
|
|
|
" info wnd <handle> Displays internal window state",
|
|
|
|
"",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
while (infotext[i]) dbg_printf("%s\n", infotext[i++]);
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-06-26 21:37:39 +02:00
|
|
|
static const char* get_symtype_str(const IMAGEHLP_MODULE64* mi)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2006-06-26 21:37:39 +02:00
|
|
|
switch (mi->SymType)
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
default:
|
|
|
|
case SymNone: return "--none--";
|
|
|
|
case SymCoff: return "COFF";
|
|
|
|
case SymCv: return "CodeView";
|
|
|
|
case SymPdb: return "PDB";
|
|
|
|
case SymExport: return "Export";
|
|
|
|
case SymDeferred: return "Deferred";
|
|
|
|
case SymSym: return "Sym";
|
2006-06-26 21:37:39 +02:00
|
|
|
case SymDia:
|
|
|
|
switch (mi->CVSig)
|
|
|
|
{
|
|
|
|
case 'S' | ('T' << 8) | ('A' << 16) | ('B' << 24):
|
|
|
|
return "Stabs";
|
|
|
|
case 'D' | ('W' << 8) | ('A' << 16) | ('R' << 24):
|
2021-09-15 10:38:40 +02:00
|
|
|
/* previous versions of dbghelp used to report this... */
|
2006-06-26 21:37:39 +02:00
|
|
|
return "Dwarf";
|
|
|
|
default:
|
2021-09-15 10:38:40 +02:00
|
|
|
if ((mi->CVSig & 0x00FFFFFF) == ('D' | ('W' << 8) | ('F' << 16)))
|
|
|
|
{
|
|
|
|
static char tmp[64];
|
|
|
|
DWORD versbit = mi->CVSig >> 24;
|
|
|
|
strcpy(tmp, "Dwarf");
|
|
|
|
if (versbit & 1) strcat(tmp, "-2");
|
|
|
|
if (versbit & 2) strcat(tmp, "-3");
|
|
|
|
if (versbit & 4) strcat(tmp, "-4");
|
|
|
|
if (versbit & 8) strcat(tmp, "-5");
|
|
|
|
return tmp;
|
|
|
|
}
|
2006-06-26 21:37:39 +02:00
|
|
|
return "DIA";
|
|
|
|
}
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
struct info_module
|
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
IMAGEHLP_MODULE64 mi;
|
|
|
|
char name[64];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct info_modules
|
|
|
|
{
|
|
|
|
struct info_module *modules;
|
2004-06-04 02:59:16 +02:00
|
|
|
unsigned num_alloc;
|
|
|
|
unsigned num_used;
|
|
|
|
};
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2018-02-01 10:08:54 +01:00
|
|
|
static void module_print_info(const struct info_module *module, BOOL is_embedded)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2009-12-12 12:19:29 +01:00
|
|
|
dbg_printf("%*.*s-%*.*s\t%-16s%s\n",
|
2018-02-01 10:08:54 +01:00
|
|
|
ADDRWIDTH, ADDRWIDTH, wine_dbgstr_longlong(module->mi.BaseOfImage),
|
|
|
|
ADDRWIDTH, ADDRWIDTH, wine_dbgstr_longlong(module->mi.BaseOfImage + module->mi.ImageSize),
|
|
|
|
is_embedded ? "\\" : get_symtype_str(&module->mi), module->name);
|
2004-06-04 02:59:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static int module_compare(const void* p1, const void* p2)
|
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
struct info_module *left = (struct info_module *)p1;
|
|
|
|
struct info_module *right = (struct info_module *)p2;
|
|
|
|
LONGLONG val = left->mi.BaseOfImage - right->mi.BaseOfImage;
|
|
|
|
|
2006-06-26 21:37:39 +02:00
|
|
|
if (val < 0) return -1;
|
|
|
|
else if (val > 0) return 1;
|
|
|
|
else return 0;
|
2004-06-04 02:59:16 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2018-02-01 10:08:54 +01:00
|
|
|
static inline BOOL module_is_container(const struct info_module *wmod_cntnr,
|
|
|
|
const struct info_module *wmod_child)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
return wmod_cntnr->mi.BaseOfImage <= wmod_child->mi.BaseOfImage &&
|
|
|
|
wmod_cntnr->mi.BaseOfImage + wmod_cntnr->mi.ImageSize >=
|
|
|
|
wmod_child->mi.BaseOfImage + wmod_child->mi.ImageSize;
|
2004-06-04 02:59:16 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2007-08-03 00:51:09 +02:00
|
|
|
static BOOL CALLBACK info_mod_cb(PCSTR mod_name, DWORD64 base, PVOID ctx)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
struct info_modules *im = ctx;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (im->num_used + 1 > im->num_alloc)
|
2002-05-25 23:18:34 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
im->num_alloc += 16;
|
2018-02-01 10:08:54 +01:00
|
|
|
im->modules = dbg_heap_realloc(im->modules, im->num_alloc * sizeof(*im->modules));
|
2002-05-25 23:18:34 +02:00
|
|
|
}
|
2018-02-01 10:08:54 +01:00
|
|
|
im->modules[im->num_used].mi.SizeOfStruct = sizeof(im->modules[im->num_used].mi);
|
|
|
|
if (SymGetModuleInfo64(dbg_curr_process->handle, base, &im->modules[im->num_used].mi))
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
const int dst_len = sizeof(im->modules[im->num_used].name);
|
|
|
|
lstrcpynA(im->modules[im->num_used].name, mod_name, dst_len - 1);
|
|
|
|
im->modules[im->num_used].name[dst_len - 1] = 0;
|
2004-06-04 02:59:16 +02:00
|
|
|
im->num_used++;
|
2018-02-01 10:08:54 +01:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* info_win32_module
|
|
|
|
*
|
|
|
|
* Display information about a given module (DLL or EXE), or about all modules
|
|
|
|
*/
|
2006-12-20 14:10:47 +01:00
|
|
|
void info_win32_module(DWORD64 base)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
struct info_modules im;
|
2007-11-29 00:11:13 +01:00
|
|
|
UINT i, j, num_printed = 0;
|
2019-06-07 01:44:31 +02:00
|
|
|
BOOL opt;
|
2006-06-26 21:37:42 +02:00
|
|
|
|
2006-10-02 22:30:11 +02:00
|
|
|
if (!dbg_curr_process)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
|
|
|
dbg_printf("Cannot get info on module while no process is loaded\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-02-01 10:08:54 +01:00
|
|
|
im.modules = NULL;
|
2006-06-26 21:37:42 +02:00
|
|
|
im.num_alloc = im.num_used = 0;
|
2004-06-04 02:59:16 +02:00
|
|
|
|
2006-06-26 21:37:42 +02:00
|
|
|
/* this is a wine specific options to return also ELF modules in the
|
|
|
|
* enumeration
|
|
|
|
*/
|
2019-06-07 01:44:31 +02:00
|
|
|
opt = SymSetExtendedOption(SYMOPT_EX_WINE_NATIVE_MODULES, TRUE);
|
2018-01-30 14:57:03 +01:00
|
|
|
SymEnumerateModules64(dbg_curr_process->handle, info_mod_cb, &im);
|
2019-06-07 01:44:31 +02:00
|
|
|
SymSetExtendedOption(SYMOPT_EX_WINE_NATIVE_MODULES, opt);
|
2004-06-04 02:59:16 +02:00
|
|
|
|
2018-02-01 10:08:54 +01:00
|
|
|
qsort(im.modules, im.num_used, sizeof(im.modules[0]), module_compare);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2009-12-12 12:19:29 +01:00
|
|
|
dbg_printf("Module\tAddress\t\t\t%sDebug info\tName (%d modules)\n",
|
|
|
|
ADDRWIDTH == 16 ? "\t\t" : "", im.num_used);
|
2004-06-04 02:59:16 +02:00
|
|
|
|
2006-06-26 21:37:42 +02:00
|
|
|
for (i = 0; i < im.num_used; i++)
|
|
|
|
{
|
|
|
|
if (base &&
|
2018-02-01 10:08:54 +01:00
|
|
|
(base < im.modules[i].mi.BaseOfImage || base >= im.modules[i].mi.BaseOfImage + im.modules[i].mi.ImageSize))
|
2006-06-26 21:37:42 +02:00
|
|
|
continue;
|
2018-02-01 10:08:54 +01:00
|
|
|
if (strstr(im.modules[i].name, "<elf>"))
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2006-06-26 21:37:42 +02:00
|
|
|
dbg_printf("ELF\t");
|
2018-02-01 10:08:54 +01:00
|
|
|
module_print_info(&im.modules[i], FALSE);
|
2006-06-26 21:37:42 +02:00
|
|
|
/* print all modules embedded in this one */
|
|
|
|
for (j = 0; j < im.num_used; j++)
|
2002-08-02 21:00:53 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
if (!strstr(im.modules[j].name, "<elf>") && module_is_container(&im.modules[i], &im.modules[j]))
|
2002-08-02 21:00:53 +02:00
|
|
|
{
|
2006-06-26 21:37:42 +02:00
|
|
|
dbg_printf(" \\-PE\t");
|
2018-02-01 10:08:54 +01:00
|
|
|
module_print_info(&im.modules[j], TRUE);
|
2002-08-02 21:00:53 +02:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
}
|
2006-06-26 21:37:42 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* check module is not embedded in another module */
|
|
|
|
for (j = 0; j < im.num_used; j++)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2018-02-01 10:08:54 +01:00
|
|
|
if (strstr(im.modules[j].name, "<elf>") && module_is_container(&im.modules[j], &im.modules[i]))
|
2006-06-26 21:37:42 +02:00
|
|
|
break;
|
2001-12-21 21:29:58 +01:00
|
|
|
}
|
2006-06-26 21:37:42 +02:00
|
|
|
if (j < im.num_used) continue;
|
2018-02-01 10:08:54 +01:00
|
|
|
if (strstr(im.modules[i].name, ".so") || strchr(im.modules[i].name, '<'))
|
2006-06-26 21:37:42 +02:00
|
|
|
dbg_printf("ELF\t");
|
|
|
|
else
|
|
|
|
dbg_printf("PE\t");
|
2018-02-01 10:08:54 +01:00
|
|
|
module_print_info(&im.modules[i], FALSE);
|
2002-08-02 21:00:53 +02:00
|
|
|
}
|
2006-06-26 21:37:42 +02:00
|
|
|
num_printed++;
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
}
|
2018-02-01 10:08:54 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, im.modules);
|
2006-06-26 21:37:42 +02:00
|
|
|
|
|
|
|
if (base && !num_printed)
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("'0x%x%08x' is not a valid module address\n", (DWORD)(base >> 32), (DWORD)base);
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
}
|
1993-09-29 13:21:49 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
struct class_walker
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
ATOM* table;
|
|
|
|
int used;
|
|
|
|
int alloc;
|
|
|
|
};
|
1993-09-29 13:21:49 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
static void class_walker(HWND hWnd, struct class_walker* cw)
|
1996-12-22 19:27:48 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
char clsName[128];
|
|
|
|
int i;
|
|
|
|
ATOM atom;
|
|
|
|
HWND child;
|
1996-12-22 19:27:48 +01:00
|
|
|
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
2004-06-04 02:59:16 +02:00
|
|
|
return;
|
2009-12-09 18:14:07 +01:00
|
|
|
if ((atom = FindAtomA(clsName)) == 0)
|
2004-06-04 02:59:16 +02:00
|
|
|
return;
|
1996-12-22 19:27:48 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
for (i = 0; i < cw->used; i++)
|
|
|
|
{
|
|
|
|
if (cw->table[i] == atom)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (i == cw->used)
|
|
|
|
{
|
|
|
|
if (cw->used >= cw->alloc)
|
|
|
|
{
|
|
|
|
cw->alloc += 16;
|
|
|
|
cw->table = dbg_heap_realloc(cw->table, cw->alloc * sizeof(ATOM));
|
|
|
|
}
|
|
|
|
cw->table[cw->used++] = atom;
|
|
|
|
info_win32_class(hWnd, clsName);
|
|
|
|
}
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if ((child = GetWindow(hWnd, GW_CHILD)) != 0)
|
|
|
|
class_walker(child, cw);
|
|
|
|
} while ((hWnd = GetWindow(hWnd, GW_HWNDNEXT)) != 0);
|
1993-09-29 13:21:49 +01:00
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_class(HWND hWnd, const char* name)
|
Release 950817
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [*/Makefile.in]
Removed winelibclean target, as it doesn't work anyway.
* [controls/button.c]
Avoid drawing the focus rectangle outside of the button.
* [controls/widgets.c]
Fixed bug with the size of the reserved bytes for the Edit
control (caused Eudora to crash).
* [debugger/*] [include/debugger.h]
Unified debugger address handling. Segmented and linear addresses
are no grouped in a single type DBG_ADDR.
All commands now accept seg:off addresses.
Module entry points are now loaded upon first entry to the
debugger, so that entry points of the loaded executable also
appear in the symbol table.
* [include/registers.h] [miscemu/*.c]
Register macros are now of the form 'AX_reg(context)' instead of 'AX'.
This makes code less readable, but will prevent a lot of name
clashes with other definitions. It also avoids a hidden reference
to the 'context' variable.
* [ipc/dde_atom.c] [misc/atom.c]
All *AddAtom and *FindAtom functions now take a SEGPTR parameter,
to allow supporting integer atoms.
Moved atom.c to memory/ directory.
* [loader/task.c]
Fixed environment allocation to compute the size dynamically.
Added 'windir' environment variable.
Fixed GetDOSEnvironment() to return the current task environment.
* [windows/message.c]
Fixed bug in MSG_GetWindowForEvent().
Wed Aug 9 11:40:43 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [include/ole.h]
Added a lot of structures from my Borland Manual. Neither complete,
nor 100% right (check please)
* [misc/shell.c]
Fixed some of the Reg* functions.
Enhanced ShellExecute.
Please test: wine "regedit.exe /v" mplayer.exe soundrec.exe
Do YOU know the format of \WINDOWS\REG.DAT? Mail me please :)
* [misc/dos_fs.c]
Make umsdos mounted windows dirs work again.
* [miscemu/emulate.c]
Added some comments, preimplementation of subfunction 7.
* [multimedia/mmsystem.c]
Implemented mciSendString. not complete, not clean, not
necessarily working (only checked with a program which uses
'cdaudio' (one working program is cool.exe, a shareware waveditor
with cdaudio play facilities.)
* [multimedia/mcicda.c]
Segptr fixes in DriverProc
Default cdrom drive in Linux is /dev/cdrom ... usually a symbolic
link to your real cdrom device.
Tue Aug 8 19:41:50 CDT 1995 Daniel Schepler <dks2@cec.wustl.edu>
* [loader/resource.c]
Don't crash in a LoadString to NULL
* [loader/resource.c]
Fixed accelerators to work with modifiers. (ALT-x modifiers still
won't work unless the ALT keypress exited the menu.)
* [misc/file.c]
Expand a file to the current offset with an _lwrite of size zero.
* [misc/file.c]
Set a newly created file to read-write instead of write-only.
Sun Aug 6 20:28:35 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/main.c] [include/msdos.h]
Fixed to return DOS version 6.22, and the correct byte order
for Windows programs.
Wed Aug 2 12:36:33 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/options.h] [memory/global.c] [misc/main.c]
Make the new IPC run-time selectible, disabling it by default.
(I think it's only useful for libwine, anyway.)
* [loader/task.c] [memory/selector.c]
In FreeSelector(), walk up the stack and fix the frames.
* [objects/dib.c]
Missing break statement in DIB_SetImageBits_RLE8().
In GetDIBits(), set the compression flag in the bitmap info to zero.
* [windows/dialog.c]
GetNextDlgGroupItem() needs to treat the first child as if it had
an implicit WS_GROUP bit set.
Mon Jul 31 15:44:47 EDT 1995 Louis-D. Dubeau <ldd@step.polymtl.ca>
* [misc/dos_fs.c]
Quick'n dirty fix for the initialisation of the Z: information
structure.
1995-08-17 19:11:36 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
WNDCLASSEXA wca;
|
2009-12-09 18:14:07 +01:00
|
|
|
HINSTANCE hInst = hWnd ? (HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE) : 0;
|
1993-09-29 13:21:49 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!name)
|
|
|
|
{
|
|
|
|
struct class_walker cw;
|
Release 951105
Fri Nov 3 20:08:17 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [configure.in]
Attempt to check for -li386 on NetBSD. Please test this.
Mon Oct 30 12:40:32 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu>
* [*/*]
Eliminated various warnings with either explicit casts or more
accurate variable/parameter declarations (e.g. INT instead of short
or WORD).
Changed macros 'min' and 'max' to 'MIN' and 'MAX', since they're
macros.
* [controls/edit.c] [windows/defdlg.c]
Added '#ifdef SUPERFLUOUS_FUNCTIONS' wrappers around function
definition of EDIT_KeyVScrollDoc, EDIT_TextLineNumber, and
DEFDLG_FindDefButton to avoid warnings.
* [controls/button.c] [controls/scroll.c] [windows/defwnd.c]
[windows/message.c] [windows/nonclient.c]
Converted MAKEPOINT macro call to manual conversion.
* [include/windows.h]
For WINELIB32, structures POINT, SIZE, and RECT have LONG members
instead of INT. This also invalidates the macro MAKEPOINT(), which
is not supported in Win32. Also defined the POINTS structure (SHORT
members) and the MAKEPOINTS macro.
* [misc/commdlg.c]
Changed a lot of 'strcpy' calls to 'strncpy' calls. I'm desperate to
find this memory bug, and this should be done anyway.
* [controls/edit.c]
Well, the alteration mentioned above didn't do it, but #ifdef'ing out
a few lines in EDIT_ClearText did. This leads to bugs, but for now,
it's better than bizzare memory troubles.
* [toolkit/miscstubs.c]
Removed warning messages in GLOBAL_CreateBlock(), GLOBAL_FreeBlock(),
and RELAY32_GetEntryPoint(). These are the most popular warnings, and
their current implementation seems fine.
Sat Oct 28 09:39:18 1995 Jochen Karrer <cip307@wpax01.Physik.Uni-Wuerzburg.DE>
* [objects/cursoricon.c]
Fix for "broken" X servers that invert masked cursor colors.
Fri Oct 27 19:27:21 1995 Alex Korobka <alex@phm6.pharm.sunysb.edu>
* [windows/dialog.c] [windows/nonclient.c]
Remove unnecessary items from the system menu.
Thu Oct 26 05:03:03 MET 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/color.c] [objects/palette.c]
Make GetNearestColor return a RGB value instead of a pixel value.
Wed Oct 25 23:33:39 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/desktop.c][controls/menu.c][include/menu.h]
Changed WORD parameters to UINT parameters.
* [include/wintypes.h]
Made UINT 32bit for WINELIB.
* [loader/main.c]
Disabled RELAY32_Init and MODULE_Init for WINELIB.
* [misc/main.c]
Assume CPU386 for WINELIB.
* [rc/winerc]
add_popup: set MF_POPUP flag on menu item.
* [toolkit/Makefile.in][toolkit/hello3.c][toolkit/hello3res.c]
Add resource demo hello3 for WINELIB.
New file README.resources.
* [toolkit/miscstubs.c]
Add a case for 17.
Tue Oct 17 15:13:10 IST 1995 Itai Nahshon <nahshon@vnet.ibm.com>
* [loader/module.c]
Do not append .exe if the file name already has an extension.
* [misc/profile.c]
Avoid creating a file with a junk name if a .ini file does not
exist.
* [if1632/gdi.spec] [if1632/user.spec] [if1632/dummy.c]
Added a lot of dummy stubs for Windows Hebrew version.
Tue Oct 17 01:03:24 1995 William Magro <wmagro@tc.cornell.edu>
* [controls/button.c]
Fix for buttons with no label.
* [controls/combo.c][controls/listbox.c]
Fixes for scrollbar positioning. Now disappears correctly
for short lists.
* [controls/edit.c]
Handle memory allocation differently when building as library.
* [controls/static]
Don't destroy old icon before drawing new icon. (Fixes landscape/
portrait toggle icon in print dialog.)
* [if1632/gdi.spec]
New functions SetMetaFileBits and GetMetaFileBits
* [include/sysmetrics.h] [windows/sysmetrics.c]
Add support for GetSystemMetrics(SM_CMETRICS) == SM_CMETRICS
* [include/windows.h]
META_EXTTEXTOUT, not META_SETTEXTOUT
define GetCurrentTime as GetTickCount (for wine library)
* [loader/main.c]
Don't initialize built-in modules in wine library
* [memory/local.c]
LocalReAlloc was defined incorrectly. Swap flags and size arguments.
* [misc/main.c]
Always report CPUTYPE=4 to wine library.
* [objects/dib.c]
RLE8 images were missing top line when decompressed.
* [objects/metafile.c]
SetMetaFileBits and GetMetaFileBits implemented. Works when called
from winhelp. More testing needed. Various memory leaks plugged.
Various other bug fixes. New metafile operations added in
PlayMetaFileRecord: CreatePalette, SetTextAlign, SelectPalette,
SetMapperFlags, RealizePalette, ExtTextOut, Escape. Testing needed.
* [toolkit/heap.c]
LocalUnLock changed to LocalUnlock
Sun Oct 15 21:55:33 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/winsock.c]
Return the correct error number, for host lookup operations.
Also, correct the problem with send_message.
Fri Oct 13 19:04:35 1995 Morten Welinder <terra@diku.dk>
* [Makefile.in]
Using nm's built-in sorting.
* [*/*.c]
Use xmalloc for malloc and xrealloc for realloc in all ungarded
cases.
* [debugger/dbg.y]
Handle C-like expressions. Clean-up.
* [debugger/debug.l]
Lots of new tokens for expressions.
* [debugger/info.c]
Implement "list" command for disassembling.
* [misc/ole2nls.c]
Implement more Danish stuff.
Fri Oct 6 10:39:39 1995 Ram'on Garc'ia <ramon@ie3.clubs.etsit.upm.es>
* [loader/module.c]
Updated self-loading modules to support for new 32 bit
stack frames.
1995-11-05 15:39:02 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
cw.table = NULL;
|
|
|
|
cw.used = cw.alloc = 0;
|
|
|
|
class_walker(GetDesktopWindow(), &cw);
|
|
|
|
HeapFree(GetProcessHeap(), 0, cw.table);
|
|
|
|
return;
|
|
|
|
}
|
Release 951105
Fri Nov 3 20:08:17 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [configure.in]
Attempt to check for -li386 on NetBSD. Please test this.
Mon Oct 30 12:40:32 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu>
* [*/*]
Eliminated various warnings with either explicit casts or more
accurate variable/parameter declarations (e.g. INT instead of short
or WORD).
Changed macros 'min' and 'max' to 'MIN' and 'MAX', since they're
macros.
* [controls/edit.c] [windows/defdlg.c]
Added '#ifdef SUPERFLUOUS_FUNCTIONS' wrappers around function
definition of EDIT_KeyVScrollDoc, EDIT_TextLineNumber, and
DEFDLG_FindDefButton to avoid warnings.
* [controls/button.c] [controls/scroll.c] [windows/defwnd.c]
[windows/message.c] [windows/nonclient.c]
Converted MAKEPOINT macro call to manual conversion.
* [include/windows.h]
For WINELIB32, structures POINT, SIZE, and RECT have LONG members
instead of INT. This also invalidates the macro MAKEPOINT(), which
is not supported in Win32. Also defined the POINTS structure (SHORT
members) and the MAKEPOINTS macro.
* [misc/commdlg.c]
Changed a lot of 'strcpy' calls to 'strncpy' calls. I'm desperate to
find this memory bug, and this should be done anyway.
* [controls/edit.c]
Well, the alteration mentioned above didn't do it, but #ifdef'ing out
a few lines in EDIT_ClearText did. This leads to bugs, but for now,
it's better than bizzare memory troubles.
* [toolkit/miscstubs.c]
Removed warning messages in GLOBAL_CreateBlock(), GLOBAL_FreeBlock(),
and RELAY32_GetEntryPoint(). These are the most popular warnings, and
their current implementation seems fine.
Sat Oct 28 09:39:18 1995 Jochen Karrer <cip307@wpax01.Physik.Uni-Wuerzburg.DE>
* [objects/cursoricon.c]
Fix for "broken" X servers that invert masked cursor colors.
Fri Oct 27 19:27:21 1995 Alex Korobka <alex@phm6.pharm.sunysb.edu>
* [windows/dialog.c] [windows/nonclient.c]
Remove unnecessary items from the system menu.
Thu Oct 26 05:03:03 MET 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/color.c] [objects/palette.c]
Make GetNearestColor return a RGB value instead of a pixel value.
Wed Oct 25 23:33:39 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/desktop.c][controls/menu.c][include/menu.h]
Changed WORD parameters to UINT parameters.
* [include/wintypes.h]
Made UINT 32bit for WINELIB.
* [loader/main.c]
Disabled RELAY32_Init and MODULE_Init for WINELIB.
* [misc/main.c]
Assume CPU386 for WINELIB.
* [rc/winerc]
add_popup: set MF_POPUP flag on menu item.
* [toolkit/Makefile.in][toolkit/hello3.c][toolkit/hello3res.c]
Add resource demo hello3 for WINELIB.
New file README.resources.
* [toolkit/miscstubs.c]
Add a case for 17.
Tue Oct 17 15:13:10 IST 1995 Itai Nahshon <nahshon@vnet.ibm.com>
* [loader/module.c]
Do not append .exe if the file name already has an extension.
* [misc/profile.c]
Avoid creating a file with a junk name if a .ini file does not
exist.
* [if1632/gdi.spec] [if1632/user.spec] [if1632/dummy.c]
Added a lot of dummy stubs for Windows Hebrew version.
Tue Oct 17 01:03:24 1995 William Magro <wmagro@tc.cornell.edu>
* [controls/button.c]
Fix for buttons with no label.
* [controls/combo.c][controls/listbox.c]
Fixes for scrollbar positioning. Now disappears correctly
for short lists.
* [controls/edit.c]
Handle memory allocation differently when building as library.
* [controls/static]
Don't destroy old icon before drawing new icon. (Fixes landscape/
portrait toggle icon in print dialog.)
* [if1632/gdi.spec]
New functions SetMetaFileBits and GetMetaFileBits
* [include/sysmetrics.h] [windows/sysmetrics.c]
Add support for GetSystemMetrics(SM_CMETRICS) == SM_CMETRICS
* [include/windows.h]
META_EXTTEXTOUT, not META_SETTEXTOUT
define GetCurrentTime as GetTickCount (for wine library)
* [loader/main.c]
Don't initialize built-in modules in wine library
* [memory/local.c]
LocalReAlloc was defined incorrectly. Swap flags and size arguments.
* [misc/main.c]
Always report CPUTYPE=4 to wine library.
* [objects/dib.c]
RLE8 images were missing top line when decompressed.
* [objects/metafile.c]
SetMetaFileBits and GetMetaFileBits implemented. Works when called
from winhelp. More testing needed. Various memory leaks plugged.
Various other bug fixes. New metafile operations added in
PlayMetaFileRecord: CreatePalette, SetTextAlign, SelectPalette,
SetMapperFlags, RealizePalette, ExtTextOut, Escape. Testing needed.
* [toolkit/heap.c]
LocalUnLock changed to LocalUnlock
Sun Oct 15 21:55:33 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/winsock.c]
Return the correct error number, for host lookup operations.
Also, correct the problem with send_message.
Fri Oct 13 19:04:35 1995 Morten Welinder <terra@diku.dk>
* [Makefile.in]
Using nm's built-in sorting.
* [*/*.c]
Use xmalloc for malloc and xrealloc for realloc in all ungarded
cases.
* [debugger/dbg.y]
Handle C-like expressions. Clean-up.
* [debugger/debug.l]
Lots of new tokens for expressions.
* [debugger/info.c]
Implement "list" command for disassembling.
* [misc/ole2nls.c]
Implement more Danish stuff.
Fri Oct 6 10:39:39 1995 Ram'on Garc'ia <ramon@ie3.clubs.etsit.upm.es>
* [loader/module.c]
Updated self-loading modules to support for new 32 bit
stack frames.
1995-11-05 15:39:02 +01:00
|
|
|
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetClassInfoExA(hInst, name, &wca))
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
|
|
|
dbg_printf("Cannot find class '%s'\n", name);
|
|
|
|
return;
|
|
|
|
}
|
Release 951105
Fri Nov 3 20:08:17 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [configure.in]
Attempt to check for -li386 on NetBSD. Please test this.
Mon Oct 30 12:40:32 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu>
* [*/*]
Eliminated various warnings with either explicit casts or more
accurate variable/parameter declarations (e.g. INT instead of short
or WORD).
Changed macros 'min' and 'max' to 'MIN' and 'MAX', since they're
macros.
* [controls/edit.c] [windows/defdlg.c]
Added '#ifdef SUPERFLUOUS_FUNCTIONS' wrappers around function
definition of EDIT_KeyVScrollDoc, EDIT_TextLineNumber, and
DEFDLG_FindDefButton to avoid warnings.
* [controls/button.c] [controls/scroll.c] [windows/defwnd.c]
[windows/message.c] [windows/nonclient.c]
Converted MAKEPOINT macro call to manual conversion.
* [include/windows.h]
For WINELIB32, structures POINT, SIZE, and RECT have LONG members
instead of INT. This also invalidates the macro MAKEPOINT(), which
is not supported in Win32. Also defined the POINTS structure (SHORT
members) and the MAKEPOINTS macro.
* [misc/commdlg.c]
Changed a lot of 'strcpy' calls to 'strncpy' calls. I'm desperate to
find this memory bug, and this should be done anyway.
* [controls/edit.c]
Well, the alteration mentioned above didn't do it, but #ifdef'ing out
a few lines in EDIT_ClearText did. This leads to bugs, but for now,
it's better than bizzare memory troubles.
* [toolkit/miscstubs.c]
Removed warning messages in GLOBAL_CreateBlock(), GLOBAL_FreeBlock(),
and RELAY32_GetEntryPoint(). These are the most popular warnings, and
their current implementation seems fine.
Sat Oct 28 09:39:18 1995 Jochen Karrer <cip307@wpax01.Physik.Uni-Wuerzburg.DE>
* [objects/cursoricon.c]
Fix for "broken" X servers that invert masked cursor colors.
Fri Oct 27 19:27:21 1995 Alex Korobka <alex@phm6.pharm.sunysb.edu>
* [windows/dialog.c] [windows/nonclient.c]
Remove unnecessary items from the system menu.
Thu Oct 26 05:03:03 MET 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/color.c] [objects/palette.c]
Make GetNearestColor return a RGB value instead of a pixel value.
Wed Oct 25 23:33:39 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/desktop.c][controls/menu.c][include/menu.h]
Changed WORD parameters to UINT parameters.
* [include/wintypes.h]
Made UINT 32bit for WINELIB.
* [loader/main.c]
Disabled RELAY32_Init and MODULE_Init for WINELIB.
* [misc/main.c]
Assume CPU386 for WINELIB.
* [rc/winerc]
add_popup: set MF_POPUP flag on menu item.
* [toolkit/Makefile.in][toolkit/hello3.c][toolkit/hello3res.c]
Add resource demo hello3 for WINELIB.
New file README.resources.
* [toolkit/miscstubs.c]
Add a case for 17.
Tue Oct 17 15:13:10 IST 1995 Itai Nahshon <nahshon@vnet.ibm.com>
* [loader/module.c]
Do not append .exe if the file name already has an extension.
* [misc/profile.c]
Avoid creating a file with a junk name if a .ini file does not
exist.
* [if1632/gdi.spec] [if1632/user.spec] [if1632/dummy.c]
Added a lot of dummy stubs for Windows Hebrew version.
Tue Oct 17 01:03:24 1995 William Magro <wmagro@tc.cornell.edu>
* [controls/button.c]
Fix for buttons with no label.
* [controls/combo.c][controls/listbox.c]
Fixes for scrollbar positioning. Now disappears correctly
for short lists.
* [controls/edit.c]
Handle memory allocation differently when building as library.
* [controls/static]
Don't destroy old icon before drawing new icon. (Fixes landscape/
portrait toggle icon in print dialog.)
* [if1632/gdi.spec]
New functions SetMetaFileBits and GetMetaFileBits
* [include/sysmetrics.h] [windows/sysmetrics.c]
Add support for GetSystemMetrics(SM_CMETRICS) == SM_CMETRICS
* [include/windows.h]
META_EXTTEXTOUT, not META_SETTEXTOUT
define GetCurrentTime as GetTickCount (for wine library)
* [loader/main.c]
Don't initialize built-in modules in wine library
* [memory/local.c]
LocalReAlloc was defined incorrectly. Swap flags and size arguments.
* [misc/main.c]
Always report CPUTYPE=4 to wine library.
* [objects/dib.c]
RLE8 images were missing top line when decompressed.
* [objects/metafile.c]
SetMetaFileBits and GetMetaFileBits implemented. Works when called
from winhelp. More testing needed. Various memory leaks plugged.
Various other bug fixes. New metafile operations added in
PlayMetaFileRecord: CreatePalette, SetTextAlign, SelectPalette,
SetMapperFlags, RealizePalette, ExtTextOut, Escape. Testing needed.
* [toolkit/heap.c]
LocalUnLock changed to LocalUnlock
Sun Oct 15 21:55:33 1995 Anand Kumria <akumria@ozemail.com.au>
* [misc/winsock.c]
Return the correct error number, for host lookup operations.
Also, correct the problem with send_message.
Fri Oct 13 19:04:35 1995 Morten Welinder <terra@diku.dk>
* [Makefile.in]
Using nm's built-in sorting.
* [*/*.c]
Use xmalloc for malloc and xrealloc for realloc in all ungarded
cases.
* [debugger/dbg.y]
Handle C-like expressions. Clean-up.
* [debugger/debug.l]
Lots of new tokens for expressions.
* [debugger/info.c]
Implement "list" command for disassembling.
* [misc/ole2nls.c]
Implement more Danish stuff.
Fri Oct 6 10:39:39 1995 Ram'on Garc'ia <ramon@ie3.clubs.etsit.upm.es>
* [loader/module.c]
Updated self-loading modules to support for new 32 bit
stack frames.
1995-11-05 15:39:02 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Class '%s':\n", name);
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("style=0x%08x wndProc=%p\n"
|
2004-06-04 02:59:16 +02:00
|
|
|
"inst=%p icon=%p cursor=%p bkgnd=%p\n"
|
|
|
|
"clsExtra=%d winExtra=%d\n",
|
2006-12-20 14:17:27 +01:00
|
|
|
wca.style, wca.lpfnWndProc, wca.hInstance,
|
2004-06-04 02:59:16 +02:00
|
|
|
wca.hIcon, wca.hCursor, wca.hbrBackground,
|
|
|
|
wca.cbClsExtra, wca.cbWndExtra);
|
2000-03-08 17:44:54 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (hWnd && wca.cbClsExtra)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
WORD w;
|
2000-03-08 17:44:54 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Extra bytes:");
|
|
|
|
for (i = 0; i < wca.cbClsExtra / 2; i++)
|
|
|
|
{
|
|
|
|
w = GetClassWord(hWnd, i * 2);
|
|
|
|
/* FIXME: depends on i386 endian-ity */
|
|
|
|
dbg_printf(" %02x %02x", HIBYTE(w), LOBYTE(w));
|
|
|
|
}
|
|
|
|
dbg_printf("\n");
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("\n");
|
|
|
|
/* FIXME:
|
|
|
|
* + print #windows (or even list of windows...)
|
|
|
|
* + print extra bytes => this requires a window handle on this very class...
|
|
|
|
*/
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
static void info_window(HWND hWnd, int indent)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
char clsName[128];
|
|
|
|
char wndName[128];
|
|
|
|
HWND child;
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
2004-06-04 02:59:16 +02:00
|
|
|
strcpy(clsName, "-- Unknown --");
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
|
2004-06-04 02:59:16 +02:00
|
|
|
strcpy(wndName, "-- Empty --");
|
|
|
|
|
2009-12-12 12:19:29 +01:00
|
|
|
dbg_printf("%*s%08lx%*s %-17.17s %08x %0*lx %08x %.14s\n",
|
2006-12-20 14:17:27 +01:00
|
|
|
indent, "", (DWORD_PTR)hWnd, 12 - indent, "",
|
2009-12-09 18:14:07 +01:00
|
|
|
clsName, GetWindowLongW(hWnd, GWL_STYLE),
|
2009-12-12 12:19:29 +01:00
|
|
|
ADDRWIDTH, (ULONG_PTR)GetWindowLongPtrW(hWnd, GWLP_WNDPROC),
|
2005-01-31 17:22:05 +01:00
|
|
|
GetWindowThreadProcessId(hWnd, NULL), wndName);
|
2004-06-04 02:59:16 +02:00
|
|
|
|
|
|
|
if ((child = GetWindow(hWnd, GW_CHILD)) != 0)
|
|
|
|
info_window(child, indent + 1);
|
|
|
|
} while ((hWnd = GetWindow(hWnd, GW_HWNDNEXT)) != 0);
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_window(HWND hWnd, BOOL detailed)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
char clsName[128];
|
|
|
|
char wndName[128];
|
|
|
|
RECT clientRect;
|
|
|
|
RECT windowRect;
|
|
|
|
WORD w;
|
2000-03-08 17:44:54 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!IsWindow(hWnd)) hWnd = GetDesktopWindow();
|
2000-03-08 17:44:54 +01:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!detailed)
|
|
|
|
{
|
2009-12-12 12:19:29 +01:00
|
|
|
dbg_printf("%-20.20s %-17.17s %-8.8s %-*.*s %-8.8s %s\n",
|
|
|
|
"Window handle", "Class Name", "Style",
|
|
|
|
ADDRWIDTH, ADDRWIDTH, "WndProc", "Thread", "Text");
|
2004-06-04 02:59:16 +02:00
|
|
|
info_window(hWnd, 0);
|
|
|
|
return;
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
2004-06-04 02:59:16 +02:00
|
|
|
strcpy(clsName, "-- Unknown --");
|
2009-12-09 18:14:07 +01:00
|
|
|
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
|
2004-06-04 02:59:16 +02:00
|
|
|
strcpy(wndName, "-- Empty --");
|
|
|
|
if (!GetClientRect(hWnd, &clientRect) ||
|
|
|
|
!MapWindowPoints(hWnd, 0, (LPPOINT) &clientRect, 2))
|
|
|
|
SetRectEmpty(&clientRect);
|
|
|
|
if (!GetWindowRect(hWnd, &windowRect))
|
|
|
|
SetRectEmpty(&windowRect);
|
|
|
|
|
|
|
|
/* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */
|
|
|
|
dbg_printf("next=%p child=%p parent=%p owner=%p class='%s'\n"
|
2009-12-10 15:23:45 +01:00
|
|
|
"inst=%p active=%p idmenu=%08lx\n"
|
2009-12-12 12:19:29 +01:00
|
|
|
"style=0x%08x exstyle=0x%08x wndproc=%p text='%s'\n"
|
2006-12-20 14:17:27 +01:00
|
|
|
"client=%d,%d-%d,%d window=%d,%d-%d,%d sysmenu=%p\n",
|
2004-06-04 02:59:16 +02:00
|
|
|
GetWindow(hWnd, GW_HWNDNEXT),
|
|
|
|
GetWindow(hWnd, GW_CHILD),
|
|
|
|
GetParent(hWnd),
|
|
|
|
GetWindow(hWnd, GW_OWNER),
|
|
|
|
clsName,
|
2009-12-09 18:14:07 +01:00
|
|
|
(HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE),
|
2004-06-04 02:59:16 +02:00
|
|
|
GetLastActivePopup(hWnd),
|
2009-12-10 15:23:45 +01:00
|
|
|
(ULONG_PTR)GetWindowLongPtrW(hWnd, GWLP_ID),
|
2009-12-09 18:14:07 +01:00
|
|
|
GetWindowLongW(hWnd, GWL_STYLE),
|
|
|
|
GetWindowLongW(hWnd, GWL_EXSTYLE),
|
2009-12-12 12:19:29 +01:00
|
|
|
(void*)GetWindowLongPtrW(hWnd, GWLP_WNDPROC),
|
2004-06-04 02:59:16 +02:00
|
|
|
wndName,
|
|
|
|
clientRect.left, clientRect.top, clientRect.right, clientRect.bottom,
|
|
|
|
windowRect.left, windowRect.top, windowRect.right, windowRect.bottom,
|
|
|
|
GetSystemMenu(hWnd, FALSE));
|
|
|
|
|
2009-12-09 18:14:07 +01:00
|
|
|
if (GetClassLongW(hWnd, GCL_CBWNDEXTRA))
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
2007-11-29 00:11:13 +01:00
|
|
|
UINT i;
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Extra bytes:");
|
2009-12-09 18:14:07 +01:00
|
|
|
for (i = 0; i < GetClassLongW(hWnd, GCL_CBWNDEXTRA) / 2; i++)
|
2004-06-04 02:59:16 +02:00
|
|
|
{
|
|
|
|
w = GetWindowWord(hWnd, i * 2);
|
|
|
|
/* FIXME: depends on i386 endian-ity */
|
|
|
|
dbg_printf(" %02x %02x", HIBYTE(w), LOBYTE(w));
|
|
|
|
}
|
|
|
|
dbg_printf("\n");
|
|
|
|
}
|
|
|
|
dbg_printf("\n");
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
|
2012-12-31 15:10:50 +01:00
|
|
|
struct dump_proc_entry
|
|
|
|
{
|
|
|
|
PROCESSENTRY32 proc;
|
|
|
|
unsigned children; /* index in dump_proc.entries of first child */
|
|
|
|
unsigned sibling; /* index in dump_proc.entries of next sibling */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dump_proc
|
|
|
|
{
|
|
|
|
struct dump_proc_entry*entries;
|
|
|
|
unsigned count;
|
|
|
|
unsigned alloc;
|
|
|
|
};
|
|
|
|
|
|
|
|
static unsigned get_parent(const struct dump_proc* dp, unsigned idx)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
|
|
|
|
for (i = 0; i < dp->count; i++)
|
|
|
|
{
|
|
|
|
if (i != idx && dp->entries[i].proc.th32ProcessID == dp->entries[idx].proc.th32ParentProcessID)
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dump_proc_info(const struct dump_proc* dp, unsigned idx, unsigned depth)
|
|
|
|
{
|
|
|
|
struct dump_proc_entry* dpe;
|
|
|
|
for ( ; idx != -1; idx = dp->entries[idx].sibling)
|
|
|
|
{
|
|
|
|
assert(idx < dp->count);
|
|
|
|
dpe = &dp->entries[idx];
|
|
|
|
dbg_printf("%c%08x %-8d ",
|
|
|
|
(dpe->proc.th32ProcessID == (dbg_curr_process ?
|
|
|
|
dbg_curr_process->pid : 0)) ? '>' : ' ',
|
|
|
|
dpe->proc.th32ProcessID, dpe->proc.cntThreads);
|
|
|
|
if (depth)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
for (i = 3 * (depth - 1); i > 0; i--) dbg_printf(" ");
|
|
|
|
dbg_printf("\\_ ");
|
|
|
|
}
|
|
|
|
dbg_printf("'%s'\n", dpe->proc.szExeFile);
|
|
|
|
dump_proc_info(dp, dpe->children, depth + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_processes(void)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
2000-04-16 21:46:35 +02:00
|
|
|
if (snap != INVALID_HANDLE_VALUE)
|
|
|
|
{
|
2012-12-31 15:10:50 +01:00
|
|
|
struct dump_proc dp;
|
|
|
|
unsigned i, first = -1;
|
|
|
|
BOOL ok;
|
|
|
|
|
|
|
|
dp.count = 0;
|
|
|
|
dp.alloc = 16;
|
|
|
|
dp.entries = HeapAlloc(GetProcessHeap(), 0, sizeof(*dp.entries) * dp.alloc);
|
2013-01-05 23:32:53 +01:00
|
|
|
if (!dp.entries)
|
|
|
|
{
|
|
|
|
CloseHandle(snap);
|
|
|
|
return;
|
|
|
|
}
|
2012-12-31 15:10:50 +01:00
|
|
|
dp.entries[dp.count].proc.dwSize = sizeof(dp.entries[dp.count].proc);
|
|
|
|
ok = Process32First(snap, &dp.entries[dp.count].proc);
|
|
|
|
|
|
|
|
/* fetch all process information into dp (skipping this debugger) */
|
2000-04-16 21:46:35 +02:00
|
|
|
while (ok)
|
|
|
|
{
|
2012-12-31 15:10:50 +01:00
|
|
|
if (dp.entries[dp.count].proc.th32ProcessID != GetCurrentProcessId())
|
|
|
|
dp.entries[dp.count++].children = -1;
|
|
|
|
if (dp.count >= dp.alloc)
|
|
|
|
{
|
|
|
|
dp.entries = HeapReAlloc(GetProcessHeap(), 0, dp.entries, sizeof(*dp.entries) * (dp.alloc *= 2));
|
|
|
|
if (!dp.entries) return;
|
|
|
|
}
|
|
|
|
dp.entries[dp.count].proc.dwSize = sizeof(dp.entries[dp.count].proc);
|
|
|
|
ok = Process32Next(snap, &dp.entries[dp.count].proc);
|
2000-04-16 21:46:35 +02:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
CloseHandle(snap);
|
2012-12-31 15:10:50 +01:00
|
|
|
/* chain the siblings wrt. their parent */
|
|
|
|
for (i = 0; i < dp.count; i++)
|
|
|
|
{
|
|
|
|
unsigned parent = get_parent(&dp, i);
|
|
|
|
unsigned *chain = parent == -1 ? &first : &dp.entries[parent].children;
|
|
|
|
dp.entries[i].sibling = *chain;
|
|
|
|
*chain = i;
|
|
|
|
}
|
|
|
|
dbg_printf(" %-8.8s %-8.8s %s (all id:s are in hex)\n", "pid", "threads", "executable");
|
|
|
|
dump_proc_info(&dp, first, 0);
|
|
|
|
HeapFree(GetProcessHeap(), 0, dp.entries);
|
2000-04-16 21:46:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-30 09:43:38 +01:00
|
|
|
static BOOL get_process_name(DWORD pid, PROCESSENTRY32* entry)
|
|
|
|
{
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
|
|
|
|
|
|
|
if (snap != INVALID_HANDLE_VALUE)
|
|
|
|
{
|
|
|
|
entry->dwSize = sizeof(*entry);
|
|
|
|
if (Process32First(snap, entry))
|
|
|
|
while (!(ret = (entry->th32ProcessID == pid)) &&
|
|
|
|
Process32Next(snap, entry));
|
|
|
|
CloseHandle(snap);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_threads(void)
|
2000-04-16 21:46:35 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
|
2000-04-16 21:46:35 +02:00
|
|
|
if (snap != INVALID_HANDLE_VALUE)
|
|
|
|
{
|
2001-08-06 19:51:52 +02:00
|
|
|
THREADENTRY32 entry;
|
|
|
|
BOOL ok;
|
|
|
|
DWORD lastProcessId = 0;
|
2000-05-11 23:43:43 +02:00
|
|
|
|
2001-08-06 19:51:52 +02:00
|
|
|
entry.dwSize = sizeof(entry);
|
2004-06-04 02:59:16 +02:00
|
|
|
ok = Thread32First(snap, &entry);
|
2000-04-16 21:46:35 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("%-8.8s %-8.8s %s (all id:s are in hex)\n",
|
|
|
|
"process", "tid", "prio");
|
2000-04-16 21:46:35 +02:00
|
|
|
while (ok)
|
|
|
|
{
|
|
|
|
if (entry.th32OwnerProcessID != GetCurrentProcessId())
|
2001-08-06 19:51:52 +02:00
|
|
|
{
|
|
|
|
/* FIXME: this assumes that, in the snapshot, all threads of a same process are
|
|
|
|
* listed sequentially, which is not specified in the doc (Wine's implementation
|
|
|
|
* does it)
|
|
|
|
*/
|
|
|
|
if (entry.th32OwnerProcessID != lastProcessId)
|
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
struct dbg_process* p = dbg_get_process(entry.th32OwnerProcessID);
|
2009-12-30 09:43:38 +01:00
|
|
|
PROCESSENTRY32 pcs_entry;
|
|
|
|
const char* exename;
|
|
|
|
|
|
|
|
if (p)
|
|
|
|
exename = dbg_W2A(p->imageName, -1);
|
|
|
|
else if (get_process_name(entry.th32OwnerProcessID, &pcs_entry))
|
|
|
|
exename = pcs_entry.szExeFile;
|
|
|
|
else
|
|
|
|
exename = "";
|
2001-08-06 19:51:52 +02:00
|
|
|
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("%08x%s %s\n",
|
2009-12-30 09:43:38 +01:00
|
|
|
entry.th32OwnerProcessID, p ? " (D)" : "", exename);
|
|
|
|
lastProcessId = entry.th32OwnerProcessID;
|
2001-08-06 19:51:52 +02:00
|
|
|
}
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("\t%08x %4d%s\n",
|
2004-06-04 02:59:16 +02:00
|
|
|
entry.th32ThreadID, entry.tpBasePri,
|
|
|
|
(entry.th32ThreadID == dbg_curr_tid) ? " <==" : "");
|
2001-08-06 19:51:52 +02:00
|
|
|
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
ok = Thread32Next(snap, &entry);
|
2000-04-16 21:46:35 +02:00
|
|
|
}
|
2001-08-06 19:51:52 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
CloseHandle(snap);
|
2000-04-16 21:46:35 +02:00
|
|
|
}
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
|
2002-08-13 20:04:01 +02:00
|
|
|
/***********************************************************************
|
2010-11-21 22:19:34 +01:00
|
|
|
* info_win32_frame_exceptions
|
2002-08-13 20:04:01 +02:00
|
|
|
*
|
2004-06-04 02:59:16 +02:00
|
|
|
* Get info on the exception frames of a given thread.
|
2002-08-13 20:04:01 +02:00
|
|
|
*/
|
2010-11-21 22:19:34 +01:00
|
|
|
void info_win32_frame_exceptions(DWORD tid)
|
2002-08-13 20:04:01 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
struct dbg_thread* thread;
|
|
|
|
void* next_frame;
|
2002-08-13 20:04:01 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!dbg_curr_process || !dbg_curr_thread)
|
2003-01-30 01:24:18 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Cannot get info on exceptions while no process is loaded\n");
|
2003-01-30 01:24:18 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Exception frames:\n");
|
2002-08-13 20:04:01 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (tid == dbg_curr_tid) thread = dbg_curr_thread;
|
2002-08-13 20:04:01 +02:00
|
|
|
else
|
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
thread = dbg_get_thread(dbg_curr_process, tid);
|
|
|
|
|
|
|
|
if (!thread)
|
|
|
|
{
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("Unknown thread id (%04x) in current process\n", tid);
|
2004-06-04 02:59:16 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (SuspendThread(thread->handle) == -1)
|
|
|
|
{
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("Can't suspend thread id (%04x)\n", tid);
|
2004-06-04 02:59:16 +02:00
|
|
|
return;
|
|
|
|
}
|
2002-08-13 20:04:01 +02:00
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!dbg_read_memory(thread->teb, &next_frame, sizeof(next_frame)))
|
2002-08-13 20:04:01 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Can't read TEB:except_frame\n");
|
2002-08-13 20:04:01 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
while (next_frame != (void*)-1)
|
2002-08-13 20:04:01 +02:00
|
|
|
{
|
2003-08-28 05:07:56 +02:00
|
|
|
EXCEPTION_REGISTRATION_RECORD frame;
|
2002-08-13 20:04:01 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("%p: ", next_frame);
|
|
|
|
if (!dbg_read_memory(next_frame, &frame, sizeof(frame)))
|
2002-08-13 20:04:01 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Invalid frame address\n");
|
2002-08-13 20:04:01 +02:00
|
|
|
break;
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("prev=%p handler=%p\n", frame.Prev, frame.Handler);
|
2002-08-13 20:04:01 +02:00
|
|
|
next_frame = frame.Prev;
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (tid != dbg_curr_tid) ResumeThread(thread->handle);
|
2002-08-13 20:04:01 +02:00
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_segments(DWORD start, int length)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
|
|
|
char flags[3];
|
|
|
|
DWORD i;
|
|
|
|
LDT_ENTRY le;
|
|
|
|
|
|
|
|
if (length == -1) length = (8192 - start);
|
|
|
|
|
|
|
|
for (i = start; i < start + length; i++)
|
|
|
|
{
|
2008-01-13 17:02:55 +01:00
|
|
|
if (!dbg_curr_process->process_io->get_selector(dbg_curr_thread->handle, (i << 3) | 7, &le))
|
2003-01-30 01:24:18 +01:00
|
|
|
continue;
|
2000-03-08 17:44:54 +01:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
if (le.HighWord.Bits.Type & 0x08)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
|
|
|
flags[0] = (le.HighWord.Bits.Type & 0x2) ? 'r' : '-';
|
|
|
|
flags[1] = '-';
|
|
|
|
flags[2] = 'x';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
flags[0] = 'r';
|
|
|
|
flags[1] = (le.HighWord.Bits.Type & 0x2) ? 'w' : '-';
|
|
|
|
flags[2] = '-';
|
|
|
|
}
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("%04x: sel=%04x base=%08x limit=%08x %d-bit %c%c%c\n",
|
2004-06-04 02:59:16 +02:00
|
|
|
i, (i << 3) | 7,
|
|
|
|
(le.HighWord.Bits.BaseHi << 24) +
|
|
|
|
(le.HighWord.Bits.BaseMid << 16) + le.BaseLow,
|
|
|
|
((le.HighWord.Bits.LimitHi << 8) + le.LimitLow) <<
|
|
|
|
(le.HighWord.Bits.Granularity ? 12 : 0),
|
|
|
|
le.HighWord.Bits.Default_Big ? 32 : 16,
|
|
|
|
flags[0], flags[1], flags[2]);
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
void info_win32_virtual(DWORD pid)
|
2000-03-08 17:44:54 +01:00
|
|
|
{
|
2002-06-02 23:36:08 +02:00
|
|
|
MEMORY_BASIC_INFORMATION mbi;
|
|
|
|
char* addr = 0;
|
2003-10-09 06:39:01 +02:00
|
|
|
const char* state;
|
|
|
|
const char* type;
|
2002-06-02 23:36:08 +02:00
|
|
|
char prot[3+1];
|
2003-01-30 01:24:18 +01:00
|
|
|
HANDLE hProc;
|
2002-06-02 23:36:08 +02:00
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (pid == dbg_curr_pid)
|
2003-01-30 01:24:18 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
if (dbg_curr_process == NULL)
|
2003-01-30 01:24:18 +01:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("Cannot look at mapping of current process, while no process is loaded\n");
|
2003-01-30 01:24:18 +01:00
|
|
|
return;
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
hProc = dbg_curr_process->handle;
|
2003-01-30 01:24:18 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
hProc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
|
|
|
|
if (hProc == NULL)
|
|
|
|
{
|
2006-12-20 14:17:27 +01:00
|
|
|
dbg_printf("Cannot open process <%04x>\n", pid);
|
2003-01-30 01:24:18 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2002-06-02 23:36:08 +02:00
|
|
|
|
2009-08-17 07:15:15 +02:00
|
|
|
dbg_printf("Address End State Type RWX\n");
|
2002-06-02 23:36:08 +02:00
|
|
|
|
2003-01-30 01:24:18 +01:00
|
|
|
while (VirtualQueryEx(hProc, addr, &mbi, sizeof(mbi)) >= sizeof(mbi))
|
2002-06-02 23:36:08 +02:00
|
|
|
{
|
|
|
|
switch (mbi.State)
|
|
|
|
{
|
|
|
|
case MEM_COMMIT: state = "commit "; break;
|
|
|
|
case MEM_FREE: state = "free "; break;
|
|
|
|
case MEM_RESERVE: state = "reserve"; break;
|
|
|
|
default: state = "??? "; break;
|
|
|
|
}
|
|
|
|
if (mbi.State != MEM_FREE)
|
|
|
|
{
|
|
|
|
switch (mbi.Type)
|
|
|
|
{
|
|
|
|
case MEM_IMAGE: type = "image "; break;
|
|
|
|
case MEM_MAPPED: type = "mapped "; break;
|
|
|
|
case MEM_PRIVATE: type = "private"; break;
|
|
|
|
case 0: type = " "; break;
|
|
|
|
default: type = "??? "; break;
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
memset(prot, ' ' , sizeof(prot) - 1);
|
|
|
|
prot[sizeof(prot) - 1] = '\0';
|
2021-07-02 09:49:25 +02:00
|
|
|
if (mbi.AllocationProtect & (PAGE_READONLY|PAGE_READWRITE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_WRITECOPY|PAGE_EXECUTE_WRITECOPY))
|
2002-06-02 23:36:08 +02:00
|
|
|
prot[0] = 'R';
|
|
|
|
if (mbi.AllocationProtect & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE))
|
|
|
|
prot[1] = 'W';
|
|
|
|
if (mbi.AllocationProtect & (PAGE_WRITECOPY|PAGE_EXECUTE_WRITECOPY))
|
|
|
|
prot[1] = 'C';
|
2021-07-02 09:49:25 +02:00
|
|
|
if (mbi.AllocationProtect & (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY))
|
2002-06-02 23:36:08 +02:00
|
|
|
prot[2] = 'X';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
type = "";
|
|
|
|
prot[0] = '\0';
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
dbg_printf("%08lx %08lx %s %s %s\n",
|
2006-12-20 14:17:27 +01:00
|
|
|
(DWORD_PTR)addr, (DWORD_PTR)addr + mbi.RegionSize - 1, state, type, prot);
|
2002-06-02 23:36:08 +02:00
|
|
|
if (addr + mbi.RegionSize < addr) /* wrap around ? */
|
|
|
|
break;
|
|
|
|
addr += mbi.RegionSize;
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
if (pid != dbg_curr_pid) CloseHandle(hProc);
|
2000-03-08 17:44:54 +01:00
|
|
|
}
|
2002-06-02 23:36:08 +02:00
|
|
|
|
2005-09-28 17:21:48 +02:00
|
|
|
void info_wine_dbg_channel(BOOL turn_on, const char* cls, const char* name)
|
2002-06-02 23:36:08 +02:00
|
|
|
{
|
2004-06-04 02:59:16 +02:00
|
|
|
struct dbg_lvalue lvalue;
|
2005-09-28 17:21:48 +02:00
|
|
|
struct __wine_debug_channel channel;
|
2002-06-02 23:36:08 +02:00
|
|
|
unsigned char mask;
|
|
|
|
int done = 0;
|
|
|
|
BOOL bAll;
|
|
|
|
void* addr;
|
|
|
|
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!dbg_curr_process || !dbg_curr_thread)
|
|
|
|
{
|
|
|
|
dbg_printf("Cannot set/get debug channels while no process is loaded\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-09-28 17:21:48 +02:00
|
|
|
if (symbol_get_lvalue("debug_options", -1, &lvalue, FALSE) != sglv_found)
|
2002-06-02 23:36:08 +02:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
addr = memory_to_linear_addr(&lvalue.addr);
|
2005-09-28 17:21:48 +02:00
|
|
|
|
|
|
|
if (!cls) mask = ~0;
|
|
|
|
else if (!strcmp(cls, "fixme")) mask = (1 << __WINE_DBCL_FIXME);
|
|
|
|
else if (!strcmp(cls, "err")) mask = (1 << __WINE_DBCL_ERR);
|
|
|
|
else if (!strcmp(cls, "warn")) mask = (1 << __WINE_DBCL_WARN);
|
|
|
|
else if (!strcmp(cls, "trace")) mask = (1 << __WINE_DBCL_TRACE);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dbg_printf("Unknown debug class %s\n", cls);
|
|
|
|
return;
|
|
|
|
}
|
2002-08-02 21:00:53 +02:00
|
|
|
|
2002-06-02 23:36:08 +02:00
|
|
|
bAll = !strcmp("all", name);
|
2005-09-28 17:21:48 +02:00
|
|
|
while (addr && dbg_read_memory(addr, &channel, sizeof(channel)))
|
2002-06-02 23:36:08 +02:00
|
|
|
{
|
2005-09-28 17:21:48 +02:00
|
|
|
if (!channel.name[0]) break;
|
|
|
|
if (bAll || !strcmp( channel.name, name ))
|
2002-06-02 23:36:08 +02:00
|
|
|
{
|
2005-09-28 17:21:48 +02:00
|
|
|
if (turn_on) channel.flags |= mask;
|
|
|
|
else channel.flags &= ~mask;
|
|
|
|
if (dbg_write_memory(addr, &channel, sizeof(channel))) done++;
|
2002-06-02 23:36:08 +02:00
|
|
|
}
|
2005-09-28 17:21:48 +02:00
|
|
|
addr = (struct __wine_debug_channel *)addr + 1;
|
2002-06-02 23:36:08 +02:00
|
|
|
}
|
2004-06-04 02:59:16 +02:00
|
|
|
if (!done) dbg_printf("Unable to find debug channel %s\n", name);
|
2003-12-15 20:53:08 +01:00
|
|
|
else WINE_TRACE("Changed %d channel instances\n", done);
|
2002-06-02 23:36:08 +02:00
|
|
|
}
|
2010-11-21 22:19:40 +01:00
|
|
|
|
|
|
|
void info_win32_exception(void)
|
|
|
|
{
|
|
|
|
const EXCEPTION_RECORD* rec;
|
|
|
|
ADDRESS64 addr;
|
|
|
|
char hexbuf[MAX_OFFSET_TO_STR_LEN];
|
|
|
|
|
|
|
|
if (!dbg_curr_thread->in_exception)
|
|
|
|
{
|
|
|
|
dbg_printf("Thread isn't in an exception\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
rec = &dbg_curr_thread->excpt_record;
|
|
|
|
memory_get_current_pc(&addr);
|
|
|
|
|
|
|
|
/* print some infos */
|
|
|
|
dbg_printf("%s: ",
|
|
|
|
dbg_curr_thread->first_chance ? "First chance exception" : "Unhandled exception");
|
|
|
|
switch (rec->ExceptionCode)
|
|
|
|
{
|
|
|
|
case EXCEPTION_BREAKPOINT:
|
|
|
|
dbg_printf("breakpoint");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_SINGLE_STEP:
|
|
|
|
dbg_printf("single step");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_INT_DIVIDE_BY_ZERO:
|
|
|
|
dbg_printf("divide by zero");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_INT_OVERFLOW:
|
|
|
|
dbg_printf("overflow");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
|
|
|
|
dbg_printf("array bounds");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_ILLEGAL_INSTRUCTION:
|
|
|
|
dbg_printf("illegal instruction");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_STACK_OVERFLOW:
|
|
|
|
dbg_printf("stack overflow");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_PRIV_INSTRUCTION:
|
|
|
|
dbg_printf("privileged instruction");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_ACCESS_VIOLATION:
|
|
|
|
if (rec->NumberParameters == 2)
|
|
|
|
dbg_printf("page fault on %s access to 0x%08lx",
|
|
|
|
rec->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT ? "write" :
|
|
|
|
rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT ? "execute" : "read",
|
|
|
|
rec->ExceptionInformation[1]);
|
|
|
|
else
|
|
|
|
dbg_printf("page fault");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_DATATYPE_MISALIGNMENT:
|
|
|
|
dbg_printf("Alignment");
|
|
|
|
break;
|
|
|
|
case DBG_CONTROL_C:
|
|
|
|
dbg_printf("^C");
|
|
|
|
break;
|
|
|
|
case CONTROL_C_EXIT:
|
|
|
|
dbg_printf("^C");
|
|
|
|
break;
|
|
|
|
case STATUS_POSSIBLE_DEADLOCK:
|
|
|
|
{
|
|
|
|
ADDRESS64 recaddr;
|
|
|
|
|
|
|
|
recaddr.Mode = AddrModeFlat;
|
|
|
|
recaddr.Offset = rec->ExceptionInformation[0];
|
|
|
|
|
|
|
|
dbg_printf("wait failed on critical section ");
|
|
|
|
print_address(&recaddr, FALSE);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case EXCEPTION_WINE_STUB:
|
|
|
|
{
|
2020-09-20 20:47:17 +02:00
|
|
|
char dll[64], name[256];
|
2010-11-21 22:19:40 +01:00
|
|
|
memory_get_string(dbg_curr_process,
|
|
|
|
(void*)rec->ExceptionInformation[0], TRUE, FALSE,
|
|
|
|
dll, sizeof(dll));
|
|
|
|
if (HIWORD(rec->ExceptionInformation[1]))
|
|
|
|
memory_get_string(dbg_curr_process,
|
|
|
|
(void*)rec->ExceptionInformation[1], TRUE, FALSE,
|
|
|
|
name, sizeof(name));
|
|
|
|
else
|
|
|
|
sprintf( name, "%ld", rec->ExceptionInformation[1] );
|
|
|
|
dbg_printf("unimplemented function %s.%s called", dll, name);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case EXCEPTION_WINE_ASSERTION:
|
|
|
|
dbg_printf("assertion failed");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_DENORMAL_OPERAND:
|
|
|
|
dbg_printf("denormal float operand");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
|
|
|
|
dbg_printf("divide by zero");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_INEXACT_RESULT:
|
|
|
|
dbg_printf("inexact float result");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_INVALID_OPERATION:
|
|
|
|
dbg_printf("invalid float operation");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_OVERFLOW:
|
|
|
|
dbg_printf("floating point overflow");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_UNDERFLOW:
|
|
|
|
dbg_printf("floating point underflow");
|
|
|
|
break;
|
|
|
|
case EXCEPTION_FLT_STACK_CHECK:
|
|
|
|
dbg_printf("floating point stack check");
|
|
|
|
break;
|
2021-02-05 10:21:30 +01:00
|
|
|
case EXCEPTION_WINE_CXX_EXCEPTION:
|
|
|
|
if(rec->NumberParameters == 3 && rec->ExceptionInformation[0] == EXCEPTION_WINE_CXX_FRAME_MAGIC)
|
2010-11-21 22:19:40 +01:00
|
|
|
dbg_printf("C++ exception(object = 0x%08lx, type = 0x%08lx)",
|
|
|
|
rec->ExceptionInformation[1], rec->ExceptionInformation[2]);
|
2021-02-05 10:21:30 +01:00
|
|
|
else if(rec->NumberParameters == 4 && rec->ExceptionInformation[0] == EXCEPTION_WINE_CXX_FRAME_MAGIC)
|
2010-11-25 01:19:39 +01:00
|
|
|
dbg_printf("C++ exception(object = %p, type = %p, base = %p)",
|
|
|
|
(void*)rec->ExceptionInformation[1], (void*)rec->ExceptionInformation[2],
|
|
|
|
(void*)rec->ExceptionInformation[3]);
|
2010-11-21 22:19:40 +01:00
|
|
|
else
|
|
|
|
dbg_printf("C++ exception with strange parameter count %d or magic 0x%08lx",
|
|
|
|
rec->NumberParameters, rec->ExceptionInformation[0]);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
dbg_printf("0x%08x", rec->ExceptionCode);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (rec->ExceptionFlags & EH_STACK_INVALID)
|
|
|
|
dbg_printf(", invalid program stack");
|
|
|
|
|
|
|
|
switch (addr.Mode)
|
|
|
|
{
|
|
|
|
case AddrModeFlat:
|
|
|
|
dbg_printf(" in %d-bit code (%s)",
|
2018-06-13 00:53:16 +02:00
|
|
|
dbg_curr_process->be_cpu->pointer_size * 8,
|
2010-11-21 22:19:40 +01:00
|
|
|
memory_offset_to_string(hexbuf, addr.Offset, 0));
|
|
|
|
break;
|
|
|
|
case AddrModeReal:
|
|
|
|
dbg_printf(" in vm86 code (%04x:%04x)", addr.Segment, (unsigned) addr.Offset);
|
|
|
|
break;
|
|
|
|
case AddrMode1616:
|
|
|
|
dbg_printf(" in 16-bit code (%04x:%04x)", addr.Segment, (unsigned) addr.Offset);
|
|
|
|
break;
|
|
|
|
case AddrMode1632:
|
2018-12-14 18:20:23 +01:00
|
|
|
dbg_printf(" in segmented 32-bit code (%04x:%08x)", addr.Segment, (unsigned) addr.Offset);
|
2010-11-21 22:19:40 +01:00
|
|
|
break;
|
|
|
|
default: dbg_printf(" bad address");
|
|
|
|
}
|
|
|
|
dbg_printf(".\n");
|
|
|
|
}
|