mirror of
https://git.stationery.faith/corn/corn.git
synced 2024-11-22 05:52:16 +00:00
formatting
This commit is contained in:
parent
6b49a206c2
commit
85a9443704
14 changed files with 127 additions and 127 deletions
|
@ -10,7 +10,7 @@ size_t backtrace(void **dst, size_t len);
|
||||||
size_t backtrace_ex(void **dst, size_t len, void *ip, void *bp);
|
size_t backtrace_ex(void **dst, size_t len, void *ip, void *bp);
|
||||||
|
|
||||||
// Log a backtrace
|
// Log a backtrace
|
||||||
void log_backtrace();
|
void log_backtrace(void);
|
||||||
|
|
||||||
// same as log_backtrace with specified insruction and base pointer
|
// same as log_backtrace with specified insruction and base pointer
|
||||||
void log_backtrace_ex(void *ip, void *bp);
|
void log_backtrace_ex(void *ip, void *bp);
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
void enable_fpu();
|
void enable_fpu(void);
|
||||||
|
|
|
@ -26,7 +26,7 @@ size_t backtrace_ex(void **dst, size_t len, void *ip, void *bp) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_backtrace() {
|
void log_backtrace(void) {
|
||||||
struct stackframe *rbp;
|
struct stackframe *rbp;
|
||||||
__asm__ ("mov %%rbp, %0" : "=r"(rbp));
|
__asm__ ("mov %%rbp, %0" : "=r"(rbp));
|
||||||
log_backtrace_ex(rbp->rip, rbp->rbp);
|
log_backtrace_ex(rbp->rip, rbp->rbp);
|
||||||
|
|
|
@ -278,7 +278,7 @@ static int debugger_handle_bkp_cmd(char *msg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void debugger_load_bkps() {
|
static void debugger_load_bkps(void) {
|
||||||
struct dr7 dr7;
|
struct dr7 dr7;
|
||||||
__asm__ volatile ("mov %%dr7, %0" : "=r"(dr7));
|
__asm__ volatile ("mov %%dr7, %0" : "=r"(dr7));
|
||||||
dr7.g0 = bkps[0].enable & bkps[0].used;
|
dr7.g0 = bkps[0].enable & bkps[0].used;
|
||||||
|
|
|
@ -26,4 +26,4 @@ struct isr_regs {
|
||||||
uint64_t ss;
|
uint64_t ss;
|
||||||
};
|
};
|
||||||
|
|
||||||
void idt_init();
|
void idt_init(void);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
|
|
||||||
void enable_fpu() {
|
void enable_fpu(void) {
|
||||||
size_t cr4;
|
size_t cr4;
|
||||||
uint16_t cw = 0x37F;
|
uint16_t cw = 0x37F;
|
||||||
__asm__ volatile ("mov %%cr4, %0" : "=r"(cr4));
|
__asm__ volatile ("mov %%cr4, %0" : "=r"(cr4));
|
||||||
|
|
Loading…
Reference in a new issue