Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread Mike Stump
On May 4, 2006, at 5:05 AM, jacob navia wrote: Well, I searched for those and found some usage examples in the source of Apple Darwin gcc code for the startup. But then... is that current? This question lacks any detail that would allow me to answer it. With enough detail, I could. ALL

Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread Richard Henderson
On Thu, May 04, 2006 at 12:49:03PM +0100, Andrew Haley wrote: > Are these an exported API? Inasmuch as we've got to support them forever for binary compatibility, I don't see why not. r~

Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread Tom Tromey
> "jacob" == jacob navia <[EMAIL PROTECTED]> writes: >> Unfortunately things are also worse for libgcj, in that we need to be >> able to generate stack traces as well, and the trampoline function >> approach won't work there. >> jacob> ? Sorry I do not follow here The java runtime needs

Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread Andrew Haley
jacob navia writes: > Andrew Haley a écrit : > > >Richard Henderson writes: > > > On Tue, May 02, 2006 at 01:23:56PM +0200, jacob navia wrote: > > > > Is there an equivalent API for linux? > > > > > > __register_frame_info_bases / __deregister_frame_info_bases. > > > >Are these an export

Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread Andrew Haley
Richard Henderson writes: > On Tue, May 02, 2006 at 01:23:56PM +0200, jacob navia wrote: > > Is there an equivalent API for linux? > > __register_frame_info_bases / __deregister_frame_info_bases. Are these an exported API? I metioned the existence of these entry points in a reply to Jacob

Re: Dynamically generated code and DWARF exception handling

2006-05-04 Thread jacob navia
Andrew Haley a écrit : Richard Henderson writes: > On Tue, May 02, 2006 at 01:23:56PM +0200, jacob navia wrote: > > Is there an equivalent API for linux? > > __register_frame_info_bases / __deregister_frame_info_bases. Are these an exported API? I metioned the existence of these entry poi

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Mike Stump
On May 3, 2006, at 4:03 PM, Perry Smith wrote: Can a link be added in the g++ documentation to this page? You mean as we've done on: http://gcc.gnu.org/readings.html under The V3 multi-vendor standard C++ ABI is used in GCC releases 3.0 and above and DWARF Workgroup ? Yes, we c

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Perry Smith
On May 3, 2006, at 8:58 AM, Daniel Jacobowitz wrote: On Wed, May 03, 2006 at 07:12:43AM -0500, Perry Smith wrote: On May 2, 2006, at 9:21 PM, Mike Stump wrote: On May 2, 2006, at 4:23 AM, jacob navia wrote: To get to the corresponding catch, the runtime should skip through the intermediate

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Richard Henderson
On Tue, May 02, 2006 at 01:23:56PM +0200, jacob navia wrote: > Is there an equivalent API for linux? __register_frame_info_bases / __deregister_frame_info_bases. r~

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread jacob navia
Tom Tromey a écrit : "jacob" == jacob navia <[EMAIL PROTECTED]> writes: jacob> This application generates dynamically code and executes it, using a jacob> JIT, a Just In time Compiler. Everything is working OK until the C++ jacob> code generates a throw. Fun! I looked at this a

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Tom Tromey
> "Andrew" == Andrew Haley <[EMAIL PROTECTED]> writes: Andrew> Adding an entry point to register debug info should not be a big deal. Andrew> We're going to need it for gcj when we add a JIT. Or for our already existing JITs :-) (Not that either of those support dwarf-style unwinding yet.) T

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Tom Tromey
> "jacob" == jacob navia <[EMAIL PROTECTED]> writes: jacob> This application generates dynamically code and executes it, using a jacob> JIT, a Just In time Compiler. Everything is working OK until the C++ jacob> code generates a throw. Fun! I looked at this a little bit with libgcj. In some

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Daniel Jacobowitz
On Wed, May 03, 2006 at 10:36:33AM +0200, jacob navia wrote: > Maybe there is some references somewhere about this? > Which JIT? Is there a source code example or something? I'm only familiar with proprietary JITs. > Would sljl exceptions work? This has already been answered. Basically, no. --

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Daniel Jacobowitz
On Wed, May 03, 2006 at 07:12:43AM -0500, Perry Smith wrote: > On May 2, 2006, at 9:21 PM, Mike Stump wrote: > > >On May 2, 2006, at 4:23 AM, jacob navia wrote: > >>To get to the corresponding catch, the runtime should skip through > >>the intermediate frames in assembler generated by the JIT. W

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Perry Smith
On May 2, 2006, at 9:21 PM, Mike Stump wrote: On May 2, 2006, at 4:23 AM, jacob navia wrote: To get to the corresponding catch, the runtime should skip through the intermediate frames in assembler generated by the JIT. We would like to know how should be the interface with gcc to do this.

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Andrew Haley
Andrew Haley writes: > Jakub Jelinek writes: > > On Wed, May 03, 2006 at 10:14:23AM +0100, Andrew Haley wrote: > > > Adding an entry point to register debug info should not be a big deal. > > > We're going to need it for gcj when we add a JIT. > > > > > > Another interesting possibility

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Andrew Haley
Jakub Jelinek writes: > On Wed, May 03, 2006 at 10:14:23AM +0100, Andrew Haley wrote: > > Adding an entry point to register debug info should not be a big deal. > > We're going to need it for gcj when we add a JIT. > > > > Another interesting possibility would be runtime extensions to > > MD

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Jakub Jelinek
On Wed, May 03, 2006 at 10:14:23AM +0100, Andrew Haley wrote: > Adding an entry point to register debug info should not be a big deal. > We're going to need it for gcj when we add a JIT. > > Another interesting possibility would be runtime extensions to > MD_FALLBACK_FRAME_STATE_FOR. That would b

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread Andrew Haley
Daniel Jacobowitz writes: > On Tue, May 02, 2006 at 07:21:24PM -0700, Mike Stump wrote: > > >Otherwise, would it be possible to generate the DWARF Tables and > > >add those tables dynamically to the running program? > > > > Yes (could require OS changes). > > > > >Under windows, Microsof

Re: Dynamically generated code and DWARF exception handling

2006-05-03 Thread jacob navia
Daniel Jacobowitz a écrit : On Tue, May 02, 2006 at 07:21:24PM -0700, Mike Stump wrote: Otherwise, would it be possible to generate the DWARF Tables and add those tables dynamically to the running program? Yes (could require OS changes). Under windows, Microsoft provides an AP

Re: Dynamically generated code and DWARF exception handling

2006-05-02 Thread Daniel Jacobowitz
On Tue, May 02, 2006 at 07:21:24PM -0700, Mike Stump wrote: > >Otherwise, would it be possible to generate the DWARF Tables and > >add those tables dynamically to the running program? > > Yes (could require OS changes). > > >Under windows, Microsoft provides an API for JITs that does exactly

Re: Dynamically generated code and DWARF exception handling

2006-05-02 Thread Mike Stump
On May 2, 2006, at 4:23 AM, jacob navia wrote: To get to the corresponding catch, the runtime should skip through the intermediate frames in assembler generated by the JIT. We would like to know how should be the interface with gcc to do this. The C++ abi spec and dwarf specs are good backgr

Dynamically generated code and DWARF exception handling

2006-05-02 Thread jacob navia
Hi We have an application compiled with gcc written in C++. This application generates dynamically code and executes it, using a JIT, a Just In time Compiler. Everything is working OK until the C++ code generates a throw. To get to the corresponding catch, the runtime should skip through the