In a compiler, a method of generating assembly code for stack unwinding is disclosed.
One or more source code lines are obtained. Assembly code for the one or more source
code lines is then generated. The assembly code includes one or more stack unwind
assembler having one or more associated stack unwind sub directives. Each of the
stack unwind assembler directives is adapted for indicating to an assembler that
one or more encoded data sections containing stack information to be used for stack
unwinding is to be generated in an object file from the one or more associated
stack unwind sub directives.