Format of the stack frames

Does anyone know where I can find the specification/layout of the stack
frames for QNX 6.1 patch A.
Or does it exists ‘ready-made’ API-functions that can help me examine the
stack content?

regards, Mats P

There is the malloc_g libraries, and/or gdb which should let you do a
backtrace and memory poking if you’re refering to application stack.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Mats Pettersson” <mats.pettersson@wavium.se> wrote in message
news:a28sq1$4nu$1@inn.qnx.com

Does anyone know where I can find the specification/layout of the stack
frames for QNX 6.1 patch A.
Or does it exists ‘ready-made’ API-functions that can help me examine the
stack content?

regards, Mats P

“Mats Pettersson” <mats.pettersson@wavium.se> writes:

| Does anyone know where I can find the specification/layout of the stack
| frames for QNX 6.1 patch A.
| Or does it exists ‘ready-made’ API-functions that can help me examine the
| stack content?

I started from backtrace.c in glibc 2.2.4, and it works pretty well
for both ppc and x86. Gives symbol names for functions in shared libraries
(that is, from the list shown by objdump -T or nm -D), so sometimes you
have to work a bit to get actual function names, but I’ve found it quite
useful. I invoke it from the signal handler, so I always have at least
some trace when something fails.

As I recall, it took only a few hours work to make it quite usable
for both platforms.