Stack traces: Difference between revisions

m
→‎Using no extensions: wrap lines that are too long to be read on small screens
m (→‎Using no extensions: cut lines that are too long to be read on small screens)
m (→‎Using no extensions: wrap lines that are too long to be read on small screens)
Line 273:
goodbye_cruel_world.c:8: --- (depth 2) ---
 
*/
#ifndef _LINUX_STDDEF_H
#include <stddef.h>
Line 351:
this->proc_name, this->proc_addr, /* procedure details */
stack_trace.stack.depth, (unsigned)stack_trace.stack.lwb-(unsigned)this);
stack_trace.indent.lwb = ( stack_trace.indent.lwb - stack_trace.indent.by ) % stack_trace.indent.upb;
( stack_trace.indent.lwb - stack_trace.indent.by ) % stack_trace.indent.upb;
}
 
Line 367 ⟶ 368:
stack_trace.stack.depth--;
if(stack_trace.on){
stack_trace.indent.lwb = ( stack_trace.indent.lwb + stack_trace.indent.by ) % stack_trace.indent.upb;
( stack_trace.indent.lwb + stack_trace.indent.by ) % stack_trace.indent.upb;
stack_trace_frame_t *this = stack_trace.stack.upb;
fprintf(stderr, fmt,
Line 439 ⟶ 441:
RETURN(EXIT_SUCCESS);
END</lang>
 
Output:
{{out}}
<pre>
stack_trace_test.c:19: BEGIN outer[0x80487b4], stack(depth:1, size:60)