[Tutor] Can someone please explain a Stack Trace

Ignacio Vazquez-Abrams ignacio@openservices.net
Wed, 3 Oct 2001 15:17:50 -0400 (EDT)


On Wed, 3 Oct 2001, John Day wrote:

> I am trying to learn "verbage" and one item I don't understand fully is
> "Stack Trace".  I have gone through numerous tutorials, yet, it is not
> working for me.  Please help.  Thank You.

A program in Python, C/C++, sh, etc. contains function calls. When a function
call is made, the program has to know where the call was made so that it can
get back when a return or end-of-function is reached.

A "stack" is a LIFO (last in, first out) data structure. As such, it "pushes"
items down and returns and removes the topmost when "popped".

The location where every function call has been made is pushed onto the stack,
and a "stack trace" is simply the list of locations contained in that stack.

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>