Yes, the GDB-jit registration stuff got pulled out (perhaps prematurely). That
said, even without function names, it's still useful to have the EH bits so
that gdb can unwind through the JIT'ed frames. Otherwise gdb (and
glibc's backtrace() function, valgrind, etc) end up stopping the unwind
prematurely, usually at the first JIT'ed frame. Combined with trivial use
of the JITEventListener, the old JIT lets you pretty easily map
'confused' frames from gdb and such to useful names.
Don't get me wrong, I'm quite excited about seeing MCJIT nuke the old
JIT. I'd just prefer not to keep losing features from the old JIT before
MCJIT is ready for prime time.
Solomon
On Nov 29, 2012, at 3:31 PM, Kaylor, Andrew wrote:
> I don't think that GDB support is even present in the latest version of
the old JIT in trunk. It used to have code to register emitted functions with
GDB in a way that let GDB find the function name and EH frame information, but
that got taken out back in January (r147615). As it stands now, I don't
think GDB would provide any useful information at all about code emitted by the
old JIT.
>
> MCJIT, on ELF platforms at least, registers emitted code with GDB for full
source level debugging (when debug info is available).
>
> -Andy
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
cs.uiuc.edu] On Behalf Of Solomon Boulos
> Sent: Thursday, November 29, 2012 1:01 PM
> To: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Old JIT Status (i.e., can we delete it?)
>
> On Nov 24, 2012, at 3:50 PM, Rafael EspĂndola wrote:
>
>> On 24 November 2012 17:36, Chris Lattner <clattner at apple.com>
wrote:
>>> As others have said, unfortunately it is premature to remove the
old jit. I don't know of anyone using the EH code though... It can almost
certainly be removed!
>>
>> Cool. I will remove the EH bits by the end of the week if no one
complains.
>
> Do you mean you're going to remove EH entirely from the old JIT? If
so, I'll complain ;).
>
> As you pointed out earlier the EH bits are useful for stack frames on
x86_64. In particular, to get useful stack traces from gdb with JIT'ed code
those EH frames need to be there. So even if other people don't currently
set JITExceptionHandling for this purpose (I do in a few projects), they
probably will when they see crashes.
>
> Solomon
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev