Wednesday, September 15, 2021

Digest for comp.lang.c++@googlegroups.com - 1 update in 1 topic

Manfred <noname@add.invalid>: Sep 15 07:20PM +0200

On 9/11/2021 1:42 AM, Ian Collins wrote:
>> logic problem, how do you map machine code to the corresponding source?
 
> If you are trying to trace a logic problem, unit tests are your friend.
>  The debugger is the last resort...
 
One additional consideration is that spotting a logic problem that
involves local variables only is usually easy just looking at the source
code.
Harder bugs may involve data that is spread across different TUs, which,
unlike local variables, have a low chance of being optimized away or
into registers by the compiler - while on the other hand the nesting
level of calls may be reduced, which makes debugging faster as David
Brown was relating to.
 
So, even if optimized code is theoretically harder to debug, practical
circumstances may come to the rescue.
But I agree that the debugger is the last resort.
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: