search for: dw_tag_lexical_block

Displaying 20 results from an estimated 47 matches for "dw_tag_lexical_block".

2011 Mar 07
1
[LLVMdev] DW_TAG_lexical_block structure in debug information
Hello, The documentation for debug information (http://llvm.org/docs/SourceLevelDebugging.html) says the structure of block descriptors metadata is: !3 = metadata !{ i32, ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block) metadata,;; Reference to context descriptor i32, ;; Line number i32 ;; Column number } However, looking at the generated metadata, there are 2 extra fields not documented here. From the source code it appears to be a link to the function holding the block, and a unique integer ID:...
2011 Apr 27
1
[LLVMdev] LLVM internal getDirectory() for LexicalBlock debug information returns filename?
...32 0, i32 12, metadata !"conv.c", metadata !"/home1/martijn/hello", metadata !"clang version 3.0 (trunk)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] ... !14 = metadata !{i32 589835, metadata !0, i32 9, i32 1, metadata !1, i32 0} ; [ DW_TAG_lexical_block ] ... !33 = metadata !{i32 13, i32 5, metadata !34, null} !34 = metadata !{i32 589835, metadata !35, i32 12, i32 3, metadata !1, i32 2} ; [ DW_TAG_lexical_block ] !35 = metadata !{i32 589835, metadata !14, i32 11, i32 3, metadata !1, i32 1} ; [ DW_TAG_lexical_block ] ... In llvm/Analysis...
2014 Aug 13
2
[LLVMdev] Advice for setting debug locations
...ells people what's wrong in this case, since the generated DWARF >> seems to be invalid? > > I'm still not sure exactly where things went wrong for you, so unsure > as to where to add the assertion - a small IR example would be helpful > for that. The suggestion to use the DW_TAG_lexical_block 3-field-form > was just based on your description of your goals, it sounded like that > was the tool you needed & weren't using yet. > >> >> On Wed, Aug 13, 2014 at 5:53 PM, David Blaikie <dblaikie at gmail.com> wrote: >>> Use the second form of DW_TAG_le...
2012 Jan 19
2
[LLVMdev] context/scope of instruction
Hello, I need to know how I get the LLVM::IDScope object of an instruction. My program contains: call void (...)* @commit(), !dbg !16 !16 = metadata !{i32 16, i32 5, metadata !8, null} !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ] LLVM::Instruction.hasMetadata() is 0 I got LLVM::Scope for variables over DIGlobalVariable.getContext() and DIVariable.getContext() but how do I get it for instructions? Regards Christian Jacobs
2014 Aug 13
2
[LLVMdev] Advice for setting debug locations
...#39;ll try it out and report back. Maybe it would be good to add an assertion or something that tells people what's wrong in this case, since the generated DWARF seems to be invalid? On Wed, Aug 13, 2014 at 5:53 PM, David Blaikie <dblaikie at gmail.com> wrote: > Use the second form of DW_TAG_lexical_block metadata (the one with 3 > fields - http://llvm.org/docs/SourceLevelDebugging.html#block-descriptors > ) to describe file changes within a sequence of LLVM IR functions. > > A small example of IR would be easier to follow if you want help > debugging why your IR is causing problems....
2011 Dec 29
2
[LLVMdev] DW_AT_location not getting generated for local variables
...base_type ] !11 = metadata !{metadata !12} !12 = metadata !{metadata !13} !13 = metadata !{i32 721152, metadata !14, metadata !"bar", metadata !7, i32 2, metadata !10, i32 0, i32 0} ; [ DW_TAG_auto_variable ] !14 = metadata !{i32 720907, metadata !15, i32 1, i32 1, metadata !7, i32 1} ; [ DW_TAG_lexical_block ] !15 = metadata !{i32 720907, metadata !5, i32 1, i32 1, metadata !7, i32 0} ; [ DW_TAG_lexical_block ] !16 = metadata !{i32 2, i32 2, metadata !14, null} !17 = metadata !{i32 3, i32 3, metadata !14, null} !18 = metadata !{i32 4, i32 4, metadata !14, null} --- And this is what dwarfdump on the co...
2020 Apr 15
2
Seeking clarification and way forward on limited scope variables.
...tually defined) at Line No. 7. Since DWARF already defined the location(on stack) which will be valid for the lifetime of the variable, contrary to when the variable is actually defined(or allocated) which is in this case Line No. 7. --------------------------------------------- 0x0000006d: DW_TAG_lexical_block DW_AT_low_pc (0x00000000002016d1) DW_AT_high_pc (0x000000000020170b) 0x0000007a: DW_TAG_variable DW_AT_location (DW_OP_fbreg -24) DW_AT_name ("Local") DW_AT_decl_file ("M...
2015 May 28
2
[LLVMdev] PGO for macro expansion code
...G('c', 'd'); while ( .. ) G('a','b'); } After perf sampling, a lot of samples that should have landed in G and GET_BIT is attributed to the two lines that have G expansion. Discriminator does not work either for this case. However the last field of DW_TAG_lexical_block ("Unique ID to identify blocks from a template function") is unique for all instances of scopes in G and GET_BIT. Can we use that to get better profile of hot and cold paths inside macro? If not, any workaround for now? Thank you. Yuanfang
2020 Apr 15
4
Seeking clarification and way forward on limited scope variables.
...t know what to do with frame-index dbg.values, but this is simple to fix). This seemed to work pretty well, and the DWARF looked legit: ``` 0x0000005f: DW_TAG_variable DW_AT_location (DW_OP_fbreg -20) DW_AT_name ("Local") 0x0000006d: DW_TAG_lexical_block DW_AT_low_pc (0x0000000100000f4f) DW_AT_high_pc (0x0000000100000f84) 0x0000007a: DW_TAG_variable DW_AT_location (0x00000000 [0x0000000100000f63, 0x0000000100000f8c): DW_OP_breg6 RBP-24)...
2010 Apr 26
0
[LLVMdev] Does llvm-gcc emit column # info?
...2 %tmp2, i32* %X, !dbg !17 ret void, !dbg !18 } declare void @llvm.dbg.declare({ }*, metadata) nounwind readnone !0 = metadata !{i32 459008, metadata !1, metadata !"X", metadata !3, i32 2, metadata !6}; [ DW_TAG_auto_variable ] !1 = metadata !{i32 458763, metadata !2}; [DW_TAG_lexical_block ] !2 = metadata !{i32 458798, i32 0, metadata !3, metadata !"foo", metadata !"foo", metadata !"foo", metadata !3, i32 1, metadata !4, i1 false, i1 true}; [DW_TAG_subprogram ] !3 = metadata !{i32 458769, i32 0, i32 12, metadata !"foo...
2010 Apr 26
3
[LLVMdev] Does llvm-gcc emit column # info?
Hi, I tried llvm-gcc -g -O0 on several cases, but the column field of meta data always shows zero in created ll code. Does llvm-gcc emit column # info ? Or I should add some option? Thanks in advance. Sheng. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100426/76b52b1f/attachment.html>
2012 Jan 02
0
[LLVMdev] DW_AT_location not getting generated for local variables
...a !{metadata !12} > !12 = metadata !{metadata !13} > !13 = metadata !{i32 721152, metadata !14, metadata !"bar", metadata !7, i32 > 2, metadata !10, i32 0, i32 0} ; [ DW_TAG_auto_variable ] > !14 = metadata !{i32 720907, metadata !15, i32 1, i32 1, metadata !7, i32 1} > ; [ DW_TAG_lexical_block ] > !15 = metadata !{i32 720907, metadata !5, i32 1, i32 1, metadata !7, i32 0} > ; [ DW_TAG_lexical_block ] > !16 = metadata !{i32 2, i32 2, metadata !14, null} > !17 = metadata !{i32 3, i32 3, metadata !14, null} > !18 = metadata !{i32 4, i32 4, metadata !14, null} > --- > &g...
2016 May 07
2
Debug info scope of explicit casting type does not seem correct
...p;t); } void f2() { struct foo { }; f1<foo>(); } blaikie at blaikie-linux:~/dev$ g++-4.7 -std=c++11 func.cpp -g -c && llvm-dwarfdump-tot -debug-dump=info func.o | grep DW_TAG 0x0000000b: DW_TAG_compile_unit [1] * 0x0000002d: DW_TAG_subprogram [2] * // f2 0x00000051: DW_TAG_lexical_block [3] 0x00000062: DW_TAG_structure_type [4] 0x0000006b: DW_TAG_subprogram [5] * // f1 0x00000087: DW_TAG_template_type_parameter [6] 0x0000008e: DW_TAG_lexical_block [7] * 0x0000009f: DW_TAG_variable [8] 0x000000ab: DW_TAG_pointer_type [9] // foo* & in fact, if...
2016 Apr 30
2
Debug info scope of explicit casting type does not seem correct
Hi, I am wondering if this behavior of creating debug info is correct. A type in compile unit entry is pointing to a type under subprogram entry?! This is the root cause of https://llvm.org/bugs/show_bug.cgi?id=27579 0x0000000b: DW_TAG_compile_unit [1] * 0x00000026: DW_TAG_pointer_type [2] DW_AT_type [DW_FORM_ref4] (cu + 0x002c => {0x0000002c})
2011 Jul 27
1
[LLVMdev] LexicalScope Debug Info - Line Number
Hi, I need to find out the line no info for each lexical block in the code being compiled with llc. The docs mention metadata format for debug info for lexical block is !3 = metadata !{ i32, ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block) metadata, ;; Reference to context descriptor i32, ;; Line number i32 ;; Column number } So the line no. info is present as its 3rd member. I am trying to extract this line number either directly from...
2012 Jan 20
0
[LLVMdev] context/scope of instruction
...gt; I need to know how I get the LLVM::IDScope object of an instruction. > > My program contains: > call void (...)* @commit(), !dbg !16 > > !16 = metadata !{i32 16, i32 5, metadata !8, null} > > !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ] > !8 is DIScope here (actually it is DILexicalBlock, which is derived from DIScope). - Devang
2012 Jan 20
1
[LLVMdev] context/scope of instruction
...the LLVM::IDScope object of an instruction. >> >> My program contains: >> call void (...)* @commit(), !dbg !16 >> >> !16 = metadata !{i32 16, i32 5, metadata !8, null} >> >> !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ] >> > > !8 is DIScope here (actually it is DILexicalBlock, which is derived from DIScope). I know. I am writing an LLVM pass and I do not know how I get a hand on the DIScope object. Which method(s) of the LLVM C++ API do I have to call to get a pointer or reference (!8) to the LLVM...
2015 May 28
0
[LLVMdev] PGO for macro expansion code
...while ( .. ) > G('a','b'); > } > > After perf sampling, a lot of samples that should have landed in G and > GET_BIT is attributed to the two lines that have G expansion. > Discriminator does not work either for this case. However the last > field of DW_TAG_lexical_block ("Unique ID to identify blocks from a > template function") is unique for all instances of scopes in G and > GET_BIT. Can we use that to get better profile of hot and cold paths > inside macro? If not, any workaround for now? Thank you. Could you file a bug report and add me to...
2016 May 08
2
Debug info scope of explicit casting type does not seem correct
...p;t); } void f2() { struct foo { }; f1<foo>(); } blaikie at blaikie-linux:~/dev$ g++-4.7 -std=c++11 func.cpp -g -c && llvm-dwarfdump-tot -debug-dump=info func.o | grep DW_TAG 0x0000000b: DW_TAG_compile_unit [1] * 0x0000002d: DW_TAG_subprogram [2] * // f2 0x00000051: DW_TAG_lexical_block [3] 0x00000062: DW_TAG_structure_type [4] 0x0000006b: DW_TAG_subprogram [5] * // f1 0x00000087: DW_TAG_template_type_parameter [6] 0x0000008e: DW_TAG_lexical_block [7] * 0x0000009f: DW_TAG_variable [8] 0x000000ab: DW_TAG_pointer_type [9] // foo* & in fact, if...
2010 May 13
4
[LLVMdev] How to get the variable mapping between the source and llvm bytecode
...a !{i32 459009, metadata !1, metadata !"i", metadata !2, i32 1, metadata !5} ; [ DW_TAG_arg_variable ] !8 = metadata !{i32 459008, metadata !9, metadata !"tmp", metadata !2, i32 2, metadata !5} ; [ DW_TAG_auto_variable ] !9 = metadata !{i32 458763, metadata !1, i32 1, i32 0} ; [ DW_TAG_lexical_block ] !10 = metadata !{i32 1, i32 0, metadata !9, null} !11 = metadata !{i32 3, i32 0, metadata !9, null} !12 = metadata !{i32 4, i32 0, metadata !9, null} Best, Kecheng 2010-05-13 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm...