Root > Reference > All Classes > TEurekaBaseStackList > Methods > TEurekaBaseStackList.Build

Method TEurekaBaseStackList.Build

Previous pageReturn to chapter overviewNext page   

Builds call stack.

 

Unit

ECallStack

 

Syntax

 

Code (Delphi)

public

procedure Build(

const AFirstAddr: Pointer = nil;

const AStackFrame: Pointer = nil;

const ATopOfStack: Pointer = nil;

const AStartLevel: Integer = -1;

const ALevelsNumber: Integer = -1;

const ADebugDetails: TEurekaDebugDetails = [ddProcedure, ddUnit, ddSourceCode];

const AThreadID: DWord = 0;

const ARunningThread: Boolean = True;

const AGetDebugInfo: Boolean = True;

const AShowBeginCalls: Boolean = False;

const AMethods: DWord = TracerInvalidMask;

const AStackOffset: PtrUInt = 0;

const AContext: Pointer = nil

);

 

Parameters

AFirstAddr [in, optional]

Code address to add to stack. May be nil (default), which means do not add any additional items to stack.

 

When specified:

must point to a code location (not to the stack).
the specified location will be added as first item to final call stack

 

AStackFrame [in, optional]

Specifies current stack pointer. This value indicate starting pointer to start tracing process. May be nil (default), which means use current stack pointer (i.e. trace entire stack).

 

When specified:

must point to stack.
this value must point to a valid stack frame.
this value must be less than ATopOfStack.

 

ATopOfStack [in, optional]

Specifies top of the stack. This value indicate ending value for tracing process. May be nil (default), which means use current stack limits (i.e. trace entire stack).

 

Usually this value is not specified, unless you want to build call stack for another (external) thread.

 

When specified:

must point to stack.
must be greater than AStackFrame.

 

AStartLevel [in, optional]

Indicates how many items (i.e. levels) should be skipped from start of call stack. Default is -1, which means "do not remove any items".

 

ALevelsNumber [in, optional]

Limits length (items' count) of call stack. Default is -1, which means "do not limit call stack".

 

ADebugDetails [in, optional]

Only store locations with this level of details. Default is [ddUnit, ddProcedure, ddSourceCode].

 

AThreadID [in, optional]

A thread ID (this is not thread handle).

 

Mark call stack items as belonging to the specified thread. Default is 0, which means current thread.

 

This argument is used to build call stack for another (external) thread, assuming that you pass CPU context and other values belonging to the specified thread. Please note that target thread must be a current thread or a suspended thread.

 

However, if you want to build a call stack for another (external) thread - there is an easier way: use the BuildForThread method.

 

ARunningThread [in, optional]

Set this argument to True when build call stacks manually. Value of False is used to indicate error (exception) thread. Default is True.

 

AGetDebugInfo [in, optional]

Retrieve debug information.

 

False - retrieve only RAW pointers; UnitName, ClassName, ProcedureName and LineNumber will be empty.

 

True - retrieve full information. Each possible property will be filled. This works slower.

 

AShowBeginCalls [in, optional]

For backward compatibility only. Always use False.

 

AMethods [in, optional]

Mask for call stack tracing methods to use. Default is DefaultTracerMask (which is "EurekaLog 7 RAW"). Do not use this argument. Use GetTracer or GetTracerClass functions.

 

AContext [in, optional]

A pointer to CPU context record. Supply this value when available.

 

Remarks

Traces CPU stack and looks for return addresses. Each found return address will be added to the list (object). You can walk though stack by using Count and Items properties.

 

See also

BuildForThread method
BuildForThreadByID Method



Send feedback... Build date: 2024-09-30
Last edited: 2024-09-30
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_method_ecallstack_teurekabasestacklist_build.php