Still problems with snoop
Francois Gouget
fgouget at free.fr
Mon Jul 23 12:08:41 CDT 2001
On Mon, 23 Jul 2001, Uwe Bonnes wrote:
> Hallo,
>
> some days ago I reported early crashes when running with the snoop debug
> option. E.g. vc98 msedv.exe is a good example. Running with "+snoop" crashes
> early. Running with "-snoop=devshl" lets the program succeed much
> further. Running without snoop gets even substancial further.
>
> So I think there must be something wrong with snoop. I tried to look hard at
> relay32/snoop.c, but didn't see anything fishy. So perhaps somebody else has
> some idea what's going wrong.
Some time ago I found that we would crash in SNOOP_PrintArg when
x==-1, eventhough it's all in a try/catch. I didn't get time to
investigate in detail. You can try to see if this patch makes things
better (the traces are there for debug in case you remove the -1 test):
--- cut here ---
Index: relay32/snoop.c
===================================================================
RCS file: /home/wine/wine/relay32/snoop.c,v
retrieving revision 1.44
diff -u -r1.44 snoop.c
--- relay32/snoop.c 2001/07/18 20:00:06 1.44
+++ relay32/snoop.c 2001/07/20 23:31:02
@@ -212,7 +214,7 @@
int i,nostring;
char * volatile ret=0;
- if ( !HIWORD(x) ) { /* trivial reject to avoid faults */
+ if ( !HIWORD(x) || x==-1 ) { /* trivial reject to avoid faults
*/
sprintf(buf,"%08lx",x);
return buf;
}
@@ -220,9 +222,13 @@
LPBYTE s=(LPBYTE)x;
i=0;nostring=0;
while (i<80) {
+ if (x==-1) TRACE("%d: i=%d\n",__LINE__,i);
if (s[i]==0) break;
+ if (x==-1) TRACE("%d: i=%d\n",__LINE__,i);
if (s[i]<0x20) {nostring=1;break;}
+ if (x==-1) TRACE("%d: i=%d\n",__LINE__,i);
if (s[i]>=0x80) {nostring=1;break;}
+ if (x==-1) TRACE("%d: i=%d\n",__LINE__,i);
i++;
}
if (!nostring) {
--- cut here ---
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
If it stinks, it's chemistry. If it moves, it's biology.
If it does not work, It's computer science.
More information about the wine-devel
mailing list