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

Constructor TEurekaBaseStackList.Create

Previous pageReturn to chapter overviewNext page   

Creates call stack object instance and (optionally) builds/traces stack.

 

Unit

ECallStack

 

Syntax

 

Code (Delphi)

public

constructor Create(

const AFirstAddr: Pointer;

const AStackFrame: Pointer = nil;

const ATopOfStack: Pointer = nil;

const AStartLevel: Integer = -1;

const ALevelsNumber: Integer = -1;

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

const AThreadID: DWord = 0;

const ARunningThread: Boolean = True;

const AGetDebugInfo: Boolean = True;

const AShowBeginCalls: Boolean = False;

const AAllowedMethods: DWord = TracerInvalidMask;

const AStackOffset: PtrUInt = 0;

const AContext: Pointer = nil

); overload; virtual;

 

constructor Create;

overload;

virtual;

 

Parameters

AFirstAddr [in, optional]

Code address to add to stack. May be nil, 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.

 

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.

 

AAllowedMethods [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.

 

Remarks

This is object constructor, which creates instances of call stack.

 

Warning

Do not create instances of TEurekaBaseStackList class. Use EurekaCallStackClass to create default call stack class or use GetTracerClass to get specific class.

 

 

Note

There are two overloaded Create constructors.   Create without arguments will create object instance without building call stack. You can trace stack on request by using Build method. Create with arguments will create object instance AND build call stack. This overload is equal to Create + Build.

 

See also




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_create.php