git-svn-id: https://spexeah.com:8443/svn/Asuro@497 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron 2018-04-11 17:13:34 +00:00
parent 82a497430f
commit 44d31235d7
65 changed files with 33 additions and 20 deletions

BIN
Asuro.iso

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,6 +15,7 @@ const
KERNEL_VIRTUAL_BASE = $C0000000; KERNEL_VIRTUAL_BASE = $C0000000;
KERNEL_PAGE_NUMBER = KERNEL_VIRTUAL_BASE SHR 22; KERNEL_PAGE_NUMBER = KERNEL_VIRTUAL_BASE SHR 22;
BSOD_ENABLE = true; BSOD_ENABLE = true;
TRACER_ENABLE = true;
type type
//internal types //internal types

View File

@ -22,7 +22,7 @@ var
procedure freeze; procedure freeze;
begin begin
t_ready:= false; if TRACER_ENABLE then t_ready:= false;
end; end;
procedure push_trace(t_name : pchar); procedure push_trace(t_name : pchar);
@ -30,24 +30,28 @@ var
mem : void; mem : void;
begin begin
if t_ready then begin if TRACER_ENABLE then begin
if not Locked then begin if t_ready then begin
Locked:= true; if not Locked then begin
mem:= LL_Insert(TraceStack, 0); Locked:= true;
memset(uint32(mem), 0, StringSize(t_name) + 5); mem:= LL_Insert(TraceStack, 0);
memcpy(uint32(t_name), uint32(mem), StringSize(t_name) + 1); memset(uint32(mem), 0, StringSize(t_name) + 5);
Locked:= false; memcpy(uint32(t_name), uint32(mem), StringSize(t_name) + 1);
Locked:= false;
end;
end; end;
end; end;
end; end;
procedure pop_trace; procedure pop_trace;
begin begin
if t_ready then begin if TRACER_ENABLE then begin
if not Locked then begin if t_ready then begin
Locked:= true; if not Locked then begin
LL_Delete(TraceStack, 0); Locked:= true;
Locked:= false; LL_Delete(TraceStack, 0);
Locked:= false;
end;
end; end;
end; end;
end; end;
@ -55,26 +59,34 @@ end;
function get_last_trace : pchar; function get_last_trace : pchar;
begin begin
get_last_trace:= nil; get_last_trace:= nil;
if t_ready then begin if TRACER_ENABLE then begin
get_last_trace:= pchar(LL_Get(TraceStack, 0)); if t_ready then begin
get_last_trace:= pchar(LL_Get(TraceStack, 0));
end;
end; end;
end; end;
procedure init; procedure init;
begin begin
TraceStack:= LL_New(255); if TRACER_ENABLE then begin
t_ready:= true; TraceStack:= LL_New(255);
push_trace('kmain'); t_ready:= true;
push_trace('kmain');
end;
end; end;
function get_trace_count : uint32; function get_trace_count : uint32;
begin begin
get_trace_count:= LL_Size(TraceStack); if TRACER_ENABLE then begin
get_trace_count:= LL_Size(TraceStack);
end;
end; end;
function get_trace_N(idx : uint32) : pchar; function get_trace_N(idx : uint32) : pchar;
begin begin
get_trace_N:= pchar(LL_Get(TraceStack, idx)); if TRACER_ENABLE then begin
get_trace_N:= pchar(LL_Get(TraceStack, idx));
end;
end; end;
end. end.