Hi, Im new to llvm and I'm using llvm-2.6 and I know how to extract the metadata in the stoppoints but what I'm interested in is the meta data regarding a local variable. I know that the @llvm.dgb.declare such as: call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable9 to { }*)) links to meta data for @llvm.dbg.variable9 which is: @llvm.dbg.variable9 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr inbounds ([2 x i8]* @.str8, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 13, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] now what I'm interested is the line number "i32 13" shown in the metadata of @llvm.dbg.variable9. I was wondering if there is a way to do so.? Thank you Samaneh -- View this message in context: http://old.nabble.com/Extracting-Metadata-of-Variables-tp28944619p28944619.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
On Sun, Jun 20, 2010 at 7:34 PM, Samaneh <snavabpo at uwaterloo.ca> wrote:> > Hi, > > Im new to llvm and I'm using llvm-2.6 and I know how to extract the metadata > in the stoppoints but what I'm interested in is the meta data regarding a > local variable. I know that the @llvm.dgb.declare such as: > > call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* > @llvm.dbg.variable9 to { }*)) > > links to meta data for @llvm.dbg.variable9 which is: > > @llvm.dbg.variable9 = internal constant %llvm.dbg.variable.type { i32 > 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { > }*), i8* getelementptr inbounds ([2 x i8]* @.str8, i32 0, i32 0), { }* > bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 > 13, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, > section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] > > now what I'm interested is the line number "i32 13" shown in the metadata of > @llvm.dbg.variable9. I was wondering if there is a way to do so.? >Use DIVariable from DebugInfo.h - Devang
Apparently Analagous Threads
- [LLVMdev] A few more questions about DIFactory and source-level debugging.
- [LLVMdev] Does llvm-db work?
- clustering of binary data
- distinct DISubprograms hindering sharing inlined subprogram descriptions
- [DebugInfo] DIBuilder missing interface to generate DWARF info for packed_decimal basic type.