Re: problems while debugger is attached
"Stefan Boberg" <[email protected]> Mon, 24 Jul 2006 15:01:11 +0200
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1902288087== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6AF21.C63BF450" This is a multi-part message in MIME format. ------_=_NextPart_001_01C6AF21.C63BF450 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've seen this many times. =20 On Windows, the kernel will detect when you have a debugger attached = and force the use of debug mode on heaps even if you're using the = non-debug CRT. This will cause subtle differences in behaviour depending = on what your (faulty) code looks like. There will be differences both in = timing and memory contents / alignment. =20 /Stefan ________________________________ From: [email protected] on behalf of = Andras Balogh Sent: Sun 23/07/2006 21:49 To: [email protected] Subject: [GD-General] problems while debugger is attached I have a strange bug, where if I'm running the program without the=20 debugger attached (CTRL-F5 in VS), the program would run correctly both = in=20 debug and release builds. But when I run the program with F5, so the=20 debugger is attached, then it blocks on a function call and never = returns.=20 If I put a breakpoint before this call, and step through it, then=20 everything seems to work fine, and the function returns as expected.. Could this be a deadlocking problem? Any ideas why attaching a debugger=20 makes any difference? And hints on how to debug this? Thanks, Andras -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 ------_=_NextPart_001_01C6AF21.C63BF450 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1">=0A= <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">=0A= <HTML>=0A= <HEAD>=0A= =0A= <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.5.7226.0">=0A= <TITLE>[GD-General] problems while debugger is attached</TITLE>=0A= </HEAD>=0A= <BODY>=0A= <DIV id=3DidOWAReplyText93473 dir=3Dltr>=0A= <DIV dir=3Dltr><FONT face=3DArial color=3D#000000 size=3D2> = I've seen this =0A= many times.</FONT></DIV>=0A= <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV>=0A= <DIV dir=3Dltr><FONT face=3DArial color=3D#000000 size=3D2> = On Windows, the =0A= kernel will detect when you have a debugger attached and force the = use of =0A= debug mode on heaps even if you're using the non-debug CRT. This will = cause =0A= subtle differences in behaviour depending on what your (faulty) code = looks like. =0A= There will be differences both in timing and memory contents / =0A= alignment.</FONT></DIV>=0A= <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV>=0A= <DIV dir=3Dltr><FONT face=3DArial size=3D2>/Stefan</FONT></DIV></DIV>=0A= <DIV dir=3Dltr><BR>=0A= <HR tabIndex=3D-1>=0A= <FONT face=3DTahoma size=3D2><B>From:</B> =0A= [email protected] on behalf of Andras =0A= Balogh<BR><B>Sent:</B> Sun 23/07/2006 21:49<BR><B>To:</B> =0A= [email protected]<BR><B>Subject:</B> = [GD-General] =0A= problems while debugger is attached<BR></FONT><BR></DIV>=0A= <DIV>=0A= <P><FONT size=3D2>I have a strange bug, where if I'm running the program = without =0A= the <BR>debugger attached (CTRL-F5 in VS), the program would run = correctly =0A= both in <BR>debug and release builds. But when I run the program = with F5, =0A= so the <BR>debugger is attached, then it blocks on a function call = and =0A= never returns. <BR>If I put a breakpoint before this call, and step = through =0A= it, then <BR>everything seems to work fine, and the function = returns as =0A= expected..<BR><BR>Could this be a deadlocking problem? Any ideas why = attaching a =0A= debugger <BR>makes any difference? And hints on how to debug =0A= this?<BR><BR>Thanks,<BR><BR><BR><BR>Andras<BR><BR>-----------------------= --------------------------------------------------<BR>Take =0A= Surveys. Earn Cash. Influence the Future of IT<BR>Join SourceForge.net's = Techsay =0A= panel and you'll get the chance to share your<BR>opinions on IT & = business =0A= topics through brief surveys -- and earn cash<BR><A =0A= href=3D"http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsource= forge&CID=3DDEVDEV">http://www.techsay.com/default.php?page=3Djoin.ph= p&p=3Dsourceforge&CID=3DDEVDEV</A><BR>___________________________= ____________________<BR>Gamedevlists-general =0A= mailing list<BR>[email protected]<BR><A =0A= href=3D"https://lists.sourceforge.net/lists/listinfo/gamedevlists-general= ">https://lists.sourceforge.net/lists/listinfo/gamedevlists-general</A><B= R>Archives:<BR><A =0A= href=3D"http://sourceforge.net/mailarchive/forum.php?forum_id=3D557">http= ://sourceforge.net/mailarchive/forum.php?forum_id=3D557</A><BR><BR></FONT= ></P></DIV>=0A= =0A= </BODY>=0A= </HTML> ------_=_NextPart_001_01C6AF21.C63BF450-- --===============1902288087== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============1902288087== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557 --===============1902288087==--