POV-Ray : Newsgroups : povray.off-topic : All your radix are belong to us! : Re: All your radix are belong to us! Server Time
29 Jul 2024 22:27:18 EDT (-0400)
  Re: All your radix are belong to us!  
From: Warp
Date: 1 Aug 2011 15:19:25
Message: <4e36fc3d@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> On 8/1/2011 10:50, Warp wrote:
> >    Maybe it's a question of complexity vs. demand, or something.

> Also compatibility, I think. To check whether you're using a stray pointer, 
> you'd have to store more than the pointer, which means void* might change 
> size, which breaks anything precompiled you link to.

  There may indeed be situations where debugging code could become
completely incompatible with a third-party precompiled library. However,
at the very least it would be nice if C/C++ compilers had a debug mode
which makes the compiler program behave like if it was run using a tool
like valgrind. Valgrind can do it even without the help of a compiler,
so there's nothing stopping the compiler itself just embedding some kind
of "valgrind" into the program itself. (And, as said, since the compiler
has the source code of the program being tested to work with, it can
probably add even more checks than what valgrind alone can.)

  Visual C++ has a decent debug mode, but I wish it did more. It would be
nice if gcc had a significantly expanded debug mode. It's not like it
would be impossible.

  On a different note, gcc and many other C/C++ compilers have a mode
which tries to profile the code as accurately as possible in terms of
how much time is spent on which parts of the code (in linux this is
used in conjunction with gprof to get the results). This can sometimes
be quite useful to find bottlenecks. I wonder if other programming
languages have similar tools.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.