help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debug output


From: Christian Christmann
Subject: Debug output
Date: Fri, 19 Jan 2007 12:25:50 +0100
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux))

Hi,

in the previous days I've seen a posting where someone compiled
his code with 
        
        c++ -O2 -Wall -fconserve-space -ggdb foo.cc


The code looked like this:
...
cout << "Starting" << endl;
...
for (sptr = l, pch = l;
 (strchr(pch, ';') ?
  pch = strchr(pch, ';') :
  pch = strchr(pch, '\r')) > 0;
      sptr = ++pch)
 {
    *pch = 0;
           cout << sptr << endl;
 }
...

When the operator executed the code, he get this debug
output:

% keramida@kobe:/tmp/foo$ ./a.out
% Starting
% l=0xbfbfe8a0, pch=0xbfbfe8a5
% hello
% l=0xbfbfe8a0, pch=0xbfbfe8ab
% world
% l=0xbfbfe8a0, pch=0xbfbfe8b0
% this
...

When I compile my code with the same options and execute it,
I don't get this detailed output with all the addresses. Any
ideas how to get it?

Regards,
Chris


reply via email to

[Prev in Thread] Current Thread [Next in Thread]