Harry
Harry

Reputation: 2968

print stack trace of application crash in vxworks

I'm new to vxworks and working on a c++ based embedded project using vxworks(PowerPC processor). The problem I'm facing is my application is getting crashed sometimes(rarely) and I'm not able to identify the location of the crash since nothing is getting printed on the tera terminal(loading the executable from host machine using ld<App.out command from tera term console application). I'm not getting useful resources in the internet about debugging in vxworks. Can somebody suggest ways of identifying the trace of where crash has occurred in vxworks.

Upvotes: 2

Views: 2541

Answers (2)

Jean-Jacques
Jean-Jacques

Reputation: 51

One important item to do: Make sure that any task running C++ code has been created with the option VX_FP_TASK. That could explain the "crash" in rare case.

Upvotes: 0

Emut
Emut

Reputation: 329

Two commands useful for debugging are i and tt.

i simply prints out the list of tasks with their names and states. It can be used to find which task(s) failed.

tt displays stack trace for a task. Example from the manual:

-> tt "logTask"
     3ab92 _vxTaskEntry   +10 : _logTask (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
      ee6e _logTask       +12 : _read (5, 3f8a10, 20)
      d460 _read          +10 : _iosRead (5, 3f8a10, 20)
      e234 _iosRead       +9c : _pipeRead (3fce1c, 3f8a10, 20)
     23978 _pipeRead      +24 : _semTake (3f8b78)
    value = 0 = 0x0

Further information on tt is available at dbgLib. i command is described at usrLib, however I can not find its manual online. Its source is available at here, where it is listed as:

  • i [task] Summary of tasks' TCBs

Upvotes: 2

Related Questions