[llvm-commits] compilation issue in __jit_debug_descriptor

Kaylor, Andrew andrew.kaylor at intel.com
Thu Dec 20 14:01:55 PST 2012


Hi Elena,

That structure is used by GDB to locate the linked list of emitted JIT object images.  If you can successfully set a breakpoint in JITed code after removing the 'static' modifier then it should be fine.  I'm not sure why the 'static' modifier is there anyway.  It isn't used in the GDB documentation for the interface that's being used (http://sourceware.org/gdb/onlinedocs/gdb/Declarations.html#Declarations).

-Andy

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Demikhovsky, Elena
Sent: Wednesday, December 19, 2012 12:07 AM
To: Eli Bendersky
Cc: Commit Messages and Patches for LLVM
Subject: [llvm-commits] compilation issue in __jit_debug_descriptor

Hi,

I want to remove "static" form __jit_debug_descriptor, because gcc adds a C++ mangling prefix in spite of "extern "C"" attribute.
Without "staic" the symbol name comes as is and gdb works.

Eli,
Could you, please, look at this? As far as I remember, it was your code.

Thanks.

Index: lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp
===================================================================
--- lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp    (revision 170503)
+++ lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp    (working copy)
@@ -44,7 +44,7 @@
   // We put information about the JITed function in this global, which the
   // debugger reads.  Make sure to specify the version statically, because the
   // debugger checks the version before we can set it during runtime.
-  static struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+  struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };

   // Debuggers puts a breakpoint in this function.
   LLVM_ATTRIBUTE_NOINLINE void __jit_debug_register_code() { }

- Elena


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list