Module: wine
Branch: master
Commit: 8a68e46953ba13d7e7bac875776b0fef8a8572db
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a68e46953ba13d7e7bac8757…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr>
Date: Fri Jan 5 21:42:53 2007 +0100
winedump: Re-use existing codeview facilities to dump OMF files.
---
include/wine/mscvpdb.h | 12 ------------
tools/winedump/debug.c | 36 +-----------------------------------
2 files changed, 1 insertions(+), 47 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h
index 064b5fa..abbd539 100644
--- a/include/wine/mscvpdb.h
+++ b/include/wine/mscvpdb.h
@@ -1650,18 +1650,6 @@ typedef struct OMFSymHash
unsigned long cbHAddr;
} OMFSymHash;
-/* FIXME: to be removed (and using codeview_symbol type above)
- * Symbol table entry */
-typedef struct DATASYM32
-{
- unsigned short reclen;
- unsigned short rectyp;
- unsigned long typind;
- unsigned long off;
- unsigned short seg;
-} DATASYM32;
-typedef DATASYM32 PUBSYM32;
-
/* sstSegMap section */
typedef struct OMFSegMapDesc
diff --git a/tools/winedump/debug.c b/tools/winedump/debug.c
index 37e0b65..3202c25 100644
--- a/tools/winedump/debug.c
+++ b/tools/winedump/debug.c
@@ -135,18 +135,12 @@ static int dump_cv_sst_global_pub(const
long fileoffset;
const OMFSymHash* header;
const BYTE* symbols;
- const BYTE* curpos;
- const PUBSYM32* sym;
- unsigned symlen;
- int recordlen;
- char nametmp[256];
fileoffset = Offset(cv_base) + omfde->lfo;
printf (" GlobalPub section starts at file offset 0x%lx\n", fileoffset);
printf (" Symbol table starts at 0x%lx\n", fileoffset + sizeof (OMFSymHash));
printf ("\n ----- Begin Symbol Table -----\n");
- printf (" (type) (symbol name) (offset) (len) (seg) (ind)\n");
header = PRD(fileoffset, sizeof(OMFSymHash));
if (!header) {printf("Can't get OMF-SymHash, aborting\n");return FALSE;}
@@ -154,35 +148,7 @@ static int dump_cv_sst_global_pub(const
symbols = PRD(fileoffset + sizeof(OMFSymHash), header->cbSymbol);
if (!symbols) {printf("Can't OMF-SymHash details, aborting\n"); return FALSE;}
- /* We don't know how many symbols are in this block of memory...only what
- * the total size of the block is. Because the symbol's name is tacked
- * on to the end of the PUBSYM32 struct, each symbol may take up a different
- * # of bytes. This makes it harder to parse through the symbol table,
- * since we won't know the exact location of the following symbol until we've
- * already parsed the current one.
- */
- for (curpos = symbols; curpos < symbols + header->cbSymbol; curpos += recordlen)
- {
- /* Point to the next PUBSYM32 in the table.
- */
- sym = (const PUBSYM32*)curpos;
-
- if (sym->reclen < sizeof(PUBSYM32)) break;
-
- symlen = sym->reclen - sizeof(PUBSYM32) + 1;
- if (symlen > sizeof(nametmp)) {printf("\nsqueeze%d\n", symlen);symlen = sizeof(nametmp) - 1;}
-
- memcpy(nametmp, curpos + sizeof (PUBSYM32) + 1, symlen);
- nametmp[symlen] = '\0';
-
- printf (" 0x%04x %-30.30s [0x%8lx] [0x%4x] %d %ld\n",
- sym->rectyp, nametmp, sym->off, sym->reclen, sym->seg, sym->typind);
-
- /* The entire record is null-padded to the nearest 4-byte
- * boundary, so we must do a little extra math to keep things straight.
- */
- recordlen = (sym->reclen + 3) & ~3;
- }
+ codeview_dump_symbols(symbols, header->cbSymbol);
return TRUE;
}
Module: wine
Branch: master
Commit: 1fcb0c1118f973a773103864be22ee816eb76843
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1fcb0c1118f973a773103864b…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr>
Date: Fri Jan 5 21:42:26 2007 +0100
winedump: While dumping NE files, use -j option if present (as we do for PE files).
---
tools/winedump/main.c | 1 +
tools/winedump/ne.c | 20 +++++++++++++++-----
tools/winedump/winedump.man.in | 18 ++++++++++--------
3 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/tools/winedump/main.c b/tools/winedump/main.c
index a760ee6..93cd074 100644
--- a/tools/winedump/main.c
+++ b/tools/winedump/main.c
@@ -398,6 +398,7 @@ int main (int argc, char *argv[])
globals.mode = NONE;
globals.forward_dll = NULL;
globals.input_name = NULL;
+ globals.dumpsect = NULL;
parse_options (argv);
diff --git a/tools/winedump/ne.c b/tools/winedump/ne.c
index a9f7dc2..9328ccf 100644
--- a/tools/winedump/ne.c
+++ b/tools/winedump/ne.c
@@ -384,9 +384,19 @@ void ne_dump( void )
if (!dos) return;
ne = PRD(dos->e_lfanew, sizeof(*ne));
- dump_ne_header( ne );
- dump_ne_names( ne );
- dump_ne_resources( ne );
- dump_ne_exports( ne );
- for (i = 1; i <= ne->ne_cseg; i++) dump_ne_segment( ne, i );
+ if (globals.do_dumpheader || !globals.dumpsect)
+ dump_ne_header( ne );
+ if (globals.do_dumpheader)
+ dump_ne_names( ne );
+ if (globals.dumpsect)
+ {
+ BOOL all = strcmp(globals.dumpsect, "ALL") == 0;
+
+ if (all || !strcmp(globals.dumpsect, "resource"))
+ dump_ne_resources( ne );
+ if (all || !strcmp(globals.dumpsect, "export"))
+ dump_ne_exports( ne );
+ }
+ if (globals.do_dumpheader)
+ for (i = 1; i <= ne->ne_cseg; i++) dump_ne_segment( ne, i );
}
diff --git a/tools/winedump/winedump.man.in b/tools/winedump/winedump.man.in
index 5a05c43..fcc596d 100644
--- a/tools/winedump/winedump.man.in
+++ b/tools/winedump/winedump.man.in
@@ -70,17 +70,19 @@ Turns on symbol demangling.
Dumps file header information.
This option dumps only the standard PE header structures,
along with the COFF sections available in the file.
-.IP "\fB-j \fIsect_name\fR"
-Dumps only the content of section sect_name (import,
-export, debug, resource, tls, clr).
-To dump only a given directory, specify them using this
-option. Currently the import, export, debug, resource,
+.IP "\fB-j \fIdir_name\fR"
+Dumps only the content of directory \fIdir_name\fR, for files
+which header points to directories.
+For PE files, currently the import, export, debug, resource,
tls and clr directories are implemented.
+For NE files, currently the export and resource directories are
+implemented.
.IP \fB-x\fR
Dumps everything.
-This command prints all available information about the
-file. You may wish to pipe the output through more/less or
-into a file, since a lot of output will be produced.
+This command prints all available information (including all
+available directories - see \fB-j\fR option) about the file. You may
+wish to pipe the output through more/less or into a file, since
+a lot of output will be produced.
.IP \fB-G\fR
Dumps contents of debug section if any (for now, only stabs
information is supported).
Module: wine
Branch: master
Commit: c3bf8b88ad18b0c1d08d6530744672d2683049eb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c3bf8b88ad18b0c1d08d65307…
Author: Kai Blin <kai.blin(a)gmail.com>
Date: Sat Jan 6 03:42:31 2007 +0100
msacm32: Fix comment and remove unneeded if check (Coverity).
Thanks to Alex Villacís Lasso for comments.
---
dlls/msacm32/driver.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msacm32/driver.c b/dlls/msacm32/driver.c
index d4ad644..88bce8c 100644
--- a/dlls/msacm32/driver.c
+++ b/dlls/msacm32/driver.c
@@ -426,11 +426,11 @@ LRESULT WINAPI acmDriverMessage(HACMDRIV
}
if (pAlias != NULL) {
- unsigned int iStructSize = 16;
- /* This verification is required because DRVCONFIGINFO is 12 bytes
- long, yet native msacm reports a 16-byte structure to codecs.
+ /* DRVCONFIGINFO is only 12 bytes long, but native msacm
+ * reports a 16-byte structure to codecs, so allocate 16 bytes,
+ * just to be on the safe side.
*/
- if (iStructSize < sizeof(DRVCONFIGINFO)) iStructSize = sizeof(DRVCONFIGINFO);
+ const unsigned int iStructSize = 16;
pConfigInfo = HeapAlloc(MSACM_hHeap, 0, iStructSize);
if (!pConfigInfo) {
ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");