Explorar o código

* Prepare for internal stack frame functions.

git-svn-id: trunk@3511 -
daniel %!s(int64=19) %!d(string=hai) anos
pai
achega
fea15be56f
Modificáronse 2 ficheiros con 9 adicións e 0 borrados
  1. 3 0
      rtl/inc/innr.inc
  2. 6 0
      rtl/inc/systemh.inc

+ 3 - 0
rtl/inc/innr.inc

@@ -64,6 +64,9 @@ const
    fpc_in_slice             = 53;
    fpc_in_move_x            = 54;
    fpc_in_fillchar_x        = 55;
+   fpc_in_get_frame         = 56;
+   fpc_in_get_caller_addr   = 57;
+   fpc_in_get_caller_frame  = 58;
 
 { Internal constant functions }
    fpc_in_const_sqr        = 100;

+ 6 - 0
rtl/inc/systemh.inc

@@ -608,9 +608,15 @@ Procedure getdir(drivenr:byte;var dir:ansistring);
 *****************************************************************************}
 
 { os independent calls to allow backtraces }
+{$IFDEF INTERNAL_BACKTRACE}
+function get_frame:pointer;[INTERNPROC:fpc_in_get_frame];
+function get_caller_addr(framebp:pointer):pointer;[INTERNPROC:fpc_in_get_caller_addr];
+function get_caller_frame(framebp:pointer):pointer;[INTERNPROC:fpc_in_get_caller_frame];
+{$ELSE}
 function get_frame:pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
 function get_caller_addr(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
 function get_caller_frame(framebp:pointer):pointer;{$ifdef SYSTEMINLINE}inline;{$endif}
+{$ENDIF}
 
 Function IOResult:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function Sptr:Pointer;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:fpc_in_const_ptr];