<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 9, 2011, at 1:28 PM, Irina Lipov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Hello,</div><div> </div><div>I want to retrieve maximal debug information which is generated after clang execution</div><div>I checked the functionality for <span style="line-height: 115%; font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: HE;">clang
: DIBuilder,CGDebugInfo,DwarfDebug classes in the clang.</span></div><div><span style="line-height: 115%; font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: HE;">They generate wide spectrum of data (For example I saw for Class type - base classes /inheritance/friends etc.)</span> </div>
<div> </div><div>i want to see all the data for debugging after clang is executed..To check this I made following example</div><blockquote style="margin-right: 0px;" dir="ltr"><div>class friendClass</div><div>{</div><div>
public:</div><div> int x;</div><div>};</div><div>class classBase</div><div>{</div><div>public:</div><div> int get1(){return 1;}</div><div> int get2(){return 2;}</div><div>};</div><div>class classDer:public classBase</div>
<div>{</div><div>public:</div><div> int get1(){return 1;}</div><div> friend class frienClass;</div><div>};</div><div> </div><div>int f()<div>{</div><div> classDer x;</div><div>  return x.get1();</div><div>}</div></div><div>
 </div></blockquote><div clear="all">After C:\Windows\system32>clang C:\clangParam\clangExample.cpp -S -emit-llvm -o -</div><div> </div></div></blockquote><div><br></div><div>You need to add -g on the command line to enable debugging information.</div><div>-</div><div>Devang</div><br><blockquote type="cite"><div dir="ltr"><div>I get following output</div><blockquote style="margin-right: 0px;"><div><div>
; ModuleID = 'C:\clangParam\clangExample.cpp'</div><div>target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"</div>
<div>target triple = "i686-pc-win32"</div></div><div>%class.classDer = type { i8 }</div><div>define i32 @_Z1fv() {</div><div>entry:</div><div>  %x = alloca %class.classDer, align 1</div><div>  %call = call i32 @_ZN8classDer4get1Ev(%class.classDer* %x)</div>
<div>  ret i32 %call</div><div>}</div><div>define linkonce_odr i32 @_ZN8classDer4get1Ev(%class.classDer* %this) nounwind align 2 {</div><div>entry:</div><div>  %this.addr = alloca %class.classDer*, align 4</div><div>  store %class.classDer* %this, %class.classDer** %this.addr, align 4</div>
<div>  %this1 = load %class.classDer** %this.addr</div><div>  ret i32 1</div><div>}</div><div> </div></blockquote><div>As can you see no remarks in the output about base and friend types</div><div>Also I tried to get <span style="line-height: 115%; font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: "Times New Roman"; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: HE;">TemplateTypeParameter/TemplateValueParameter</span>  in such a way for some template class but the results were "similar"</div>
<div>What can you propose to solve this problems and get full/maximum debug information after clang.</div><div>Thanks in advance.</div><div><div>
 </div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></body></html>