Browse Prior Art Database

Exception Handling on Demand Disclosure Number: IPCOM000126441D
Original Publication Date: 2005-Jul-18
Included in the Prior Art Database: 2005-Jul-18
Document File: 1 page(s) / 41K

Publishing Venue



As part of the strategic effort to incorporate open source z/TPF ran into many challenges one of them in the area of C++ exception handling. In the GCC open source world the standard UNIX based operating systems provide the start up infrastructure to initialize each process for exception handling. Given that most processes will not actually throw an exception as part of normal operation z/TPF cannot afford the performance penalty for each process. To resolve this issue z/TPF developed Exceptions on Demand.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 1

Exception Handling on Demand

Moving to the GCC world required many design changes and design compromises to maintain z/TPF as one of the top enterprise-worthy systems in the world. This publication focuses on one of the many areas that went under development to allow both z/TPF and the GCC open source world to co-exist, namely C++ exception handling. In the open source world exception handling is tightly coupled to the GNU compiler collection (GCC). One important aspect of GCC exception handling that must be understood is that the compiler itself generates exception handling information in the form of FDE's and CIE's in each source file compiled with the g++ compiler. When all the objects are linked together into a shared object this exception handling information is aggregated to create the ".eh_frame" section. For exception handling to appropriately work in a process that spans several shared objects this information needs to be registered for each shared object that can potentially be called. For typical gnu processes this registration occurs upon entry to the main function. During run time the exception handling logic which was linked into the executable as an archive by the compiler parses the ".eh_frame" sections. Based on the information gathered the exception logic knows when to jump to which function to execute exception handling events such as destructors and catch clauses. Unlike the GCC world z/TPF does not gather ".eh_frame" sections prior to a process run because of both the performance overhead incurred and lack of gnu start-up infrastructure. This required z/TPF to come up with a solution that fulfil...