On 11/15/02 Gopal V wrote: > It is possible ... JIT generated code looks just like loaded code to > gcc ... Typically gdb should only need access to a symfile to correctly > allow debugging ... So an .o file of the JIT'd code should be correctly > generated with all the trimmings. > > $ gdb parrot > (gdb) run -debug=dwarf2 --break __main__ Foo.pbc > (gdb) call Parrot_debug_make_syms() > (gdb) add-symbol-file Foo.o > Reading symbols from Foo.o > (gdb) frame > #0 __main__ at Foo.py:5 (HINT: where's the python compiler :-) > > The trick here is to use `gas' or the gnu assembler to generate the > debugging info from the assembly dump you provide ... For example a > function would be dumped as...
You can find the complete examples of how the jit debugging features work in the mono tarball (mono/doc directory): the above was a partial cut&paste with s/mono/parrot/ :-) We have also an implementation of the symbol file writer in mono/jit/debug* that may be helpful to look at. lupus -- ----------------------------------------------------------------- [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better