21 lines
596 B
C
21 lines
596 B
C
|
#ifndef JOS_KERN_KDEBUG_H
|
||
|
#define JOS_KERN_KDEBUG_H
|
||
|
|
||
|
#include <inc/types.h>
|
||
|
|
||
|
// Debug information about a particular instruction pointer
|
||
|
struct Eipdebuginfo {
|
||
|
const char *eip_file; // Source code filename for EIP
|
||
|
int eip_line; // Source code linenumber for EIP
|
||
|
|
||
|
const char *eip_fn_name; // Name of function containing EIP
|
||
|
// - Note: not null terminated!
|
||
|
int eip_fn_namelen; // Length of function name
|
||
|
uintptr_t eip_fn_addr; // Address of start of function
|
||
|
int eip_fn_narg; // Number of function arguments
|
||
|
};
|
||
|
|
||
|
int debuginfo_eip(uintptr_t eip, struct Eipdebuginfo *info);
|
||
|
|
||
|
#endif
|