[Krafton Jungle] PintOS 2.0.0
크래프톤 정글 PintOS
 
Loading...
Searching...
No Matches
debug.c File Reference
#include <debug.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for debug.c:

Functions

void debug_backtrace (void)
 

Function Documentation

◆ debug_backtrace()

void debug_backtrace ( void  )
13 {
14 static bool explained;
15 void **frame;
16
17 printf ("Call stack:");
18 for (frame = __builtin_frame_address (0);
19 frame != NULL && frame[0] != NULL;
20 frame = frame[0])
21 printf (" %p", frame[1]);
22 printf (".\n");
23
24 if (!explained) {
25 explained = true;
26 printf ("The `backtrace' program can make call stacks useful.\n"
27 "Read \"Backtraces\" in the \"Debugging Tools\" chapter\n"
28 "of the Pintos documentation for more information.\n");
29 }
30}
#define NULL
Definition: stddef.h:4
int printf(const char *,...) PRINTF_FORMAT(1
Definition: vm.h:77
Here is the call graph for this function:
Here is the caller graph for this function: