www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/22/07:27:22

Xref: news2.mv.net comp.os.msdos.djgpp:2047
From: Jim Schwarz x3-7961 <schwarz AT escmail DOT orl DOT mmc DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bug hides with GDB.
Date: Thu, 21 Mar 1996 16:26:45 -0500
Organization: Martin Marietta - Information Systems
Lines: 34
Message-ID: <3151C995.2AC2@escmail.orl.mmc.com>
References: <4iqeht$c1t AT news DOT manawatu DOT gen DOT nz>
NNTP-Posting-Host: marino.orl.mmc.com
Mime-Version: 1.0
To: malcolm AT manawatu DOT gen DOT nz
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

  In my expierience, I usually find that timing problems are involved 
when something works under the debugger, but not in real-time. The
program will run a little slower in debug. Another possability is that
you don't normally optimize when in debug, where you might when 
building a non-debug version.  Look for some variable that is not
scoped correct, such that the compiler doen't think its used and
deletes it when optimizing.  

Jim

Malcolm Taylor wrote:
> 
> Hi,
>         I have a fairly annoying bug that is hiding when I use GDB to try to
> find it. The bug is that a search through a small database (using
> strcmp's) returns a NULL pointer (which normally means that it found
> nothing) when running normally, but when run through GDB the function
> finds the correct match. I was wondering if anyone had any ideas of
> what sort of functions or methods or bugs etc. could cause this effect
> (ie work when using a debugger). Basicly what is the difference in the
> environment between running normally and through a debugger.
> 
> Thanks,
> Malcolm

-- 
James E. Schwarz, Jr. PE

Staff Systems Engineer - Armor Programs
Lockheed Martin Corporation          Information Systems 
12506 Lk Underhill Rd. MP 823        Orlando, Fla 32825          
<schwarz AT escmail DOT orl DOT mmc DOT com>        Voice: (407)826-7961

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019