<DIV>Thanks for trying it out and replying.</DIV>
<DIV> </DIV>
<DIV>This is weird but I tried again and again and the tools are working fine now.</DIV>
<DIV>I was working in school account, maybe some change in permissions worked.</DIV>
<DIV>Otherwise I am confused.</DIV>
<DIV> </DIV>
<DIV>Thanks anyways</DIV>
<DIV>Tanu</DIV>
<DIV><BR><BR><B><I>Reid Spencer <reid@x10sys.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Tue, 2004-11-30 at 08:58, Chris Lattner wrote:<BR>> On Tue, 30 Nov 2004, Tanu Sharma wrote:<BR>> <BR>> > I have trouble using the llvm tools.Some of the errors are :<BR>> ><BR>> > $ llvm-dis prog.bc<BR>> > $ llvm-dis: Invalid Top Level Block Length! Type:1, Size:456 (Vers=0, Pos=12)<BR>> <BR>> Can you explain how you generated this bytecode file? It looks corrupted<BR>> or something. Also, can you send the actual bytecode file itself?<BR><BR>Okay, Tanu sent the bytecode file and it works fine with llvm-bcanalyzer<BR>and llvm-dis. The output from those tools are attached. <BR><BR>So, I think the real question is: "what llvm-dis where you running?". <BR><BR>Reid.<BR>target endian = little<BR>target pointersize = 32<BR>%struct..TorRec = type { int, void ()* }<BR>%struct.TorRec = type { int, void ()* }<BR>%.str_1 = internal constant [24 x!
  sbyte]
 c"This is main function \0A\00" ; <[24 x sbyte]*> [#uses=1]<BR>%.str_2 = internal constant [21 x sbyte] c"Calling sub function\00" ; <[21 x sbyte]*> [#uses=1]<BR>%.str_3 = internal constant [21 x sbyte] c"This is sub function\00" ; <[21 x sbyte]*> [#uses=1]<BR>%Initialized.0__ = internal global bool false ; <BOOL*>[#uses=2]<BR><BR>implementation ; Functions:<BR><BR>declare int %printf(sbyte*, ...)<BR><BR>declare void %exit(int)<BR><BR>int %main() {<BR>entry:<BR>%tmp.1.i = load bool* %Initialized.0__ ; <BOOL>[#uses=1]<BR>br bool %tmp.1.i, label %__main.entry, label %endif.0.i<BR><BR>endif.0.i: ; preds = %entry<BR>store bool true, bool* %Initialized.0__<BR>br label %__main.entry<BR><BR>__main.entry: ; preds = %entry, %endif.0.i<BR>%tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([24 x sbyte]* %.str_1, int 0, int 0) ) ; <INT>[#uses=0]<BR>%tmp.2 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([21 x sbyte]* %.str_2, int 0, int 0) ) ;
 <INT>[#uses=0]<BR>%tmp.0.i = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([21 x sbyte]* %.str_3, int 0, int 0) ) ; <INT>[#uses=0]<BR>call void %exit( int 1 )<BR>ret int 0<BR>}<BR><BR>Summary Analysis Of prog.bc: <BR><BR>Bytecode Analysis Of Module: prog.bc<BR>Bytecode Version Number: 3<BR>File Size: 469<BR>Module Bytes: 469 (100%)<BR>Function Bytes: 138 (29.42%)<BR>Global Types Bytes: 42 (8.955%)<BR>Constant Pool Bytes: 105 (22.39%)<BR>Module Globals Bytes: 20 (4.264%)<BR>Instruction List Bytes: 48 (10.23%)<BR>Compaction Table Bytes: 1 (0.2132%)<BR>Symbol Table Bytes: 176 (37.53%)<BR>Alignment Bytes: 29 (6.183%)<BR>Block Header Bytes: 40 (8.529%)<BR>Dependent Libraries Bytes: 0 (0%)<BR>Number Of Bytecode Blocks: 10<BR>Number Of Functions: 3<BR>Number Of Types: 15<BR>Number Of Constants: 8<BR>Number Of Global Variables: 4<BR>Number Of Values: 27<BR>Number Of Basic Blocks: 3<BR>Number Of Instructions: 9<BR>Number Of Long Instructions: 3<BR>Number Of Operands: 16<BR>!
 Number Of
 Compaction Tables: 1<BR>Number Of Symbol Tables: 2<BR>Number Of Dependent Libs: 0<BR>Total Instruction Size: 48<BR>Average Instruction Size: 5.33333<BR>Maximum Type Slot Number: 14<BR>Maximum Value Slot Number: 17<BR>Bytes Per Value : 15.6333<BR>Bytes Per Global: 6.18519<BR>Bytes Per Function: 46<BR># of VBR 32-bit Integers: 167<BR># of VBR 64-bit Integers: 1<BR># of VBR Compressed Bytes: 172<BR># of VBR Expanded Bytes: 676<BR>Bytes Saved With VBR: 504 (74.56%)<BR><BR>Detailed Analysis Of prog.bc Functions:<BR><BR>External Function: printf<BR>Type:: int (sbyte*, ...)*<BR>Byte Size: 1<BR><BR>External Function: exit<BR>Type:: void (int)*<BR>Byte Size: 1<BR><BR>Function: main<BR>Type:: int ()*<BR>Byte Size: 136<BR>Basic Blocks: 3<BR>Instructions: 9<BR>Long Instructions: 3<BR>Operands: 0<BR>Instruction Size: 48<BR>Average Instruction Size: 5.33333<BR>Bytes Per Instruction: 15.1111<BR># of VBR 32-bit Integers: 37<BR># of VBR 64-bit Integers: 0<BR># of VBR Compressed Bytes: 37<BR!
 ># of VBR
 Expanded Bytes: 148<BR>Bytes Saved With VBR: 111<BR><BR><BR>> ATTACHMENT part 1.2 application/pgp-signature name=signature.asc<BR>_______________________________________________<BR>LLVM Developers mailing list<BR>LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu<BR>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - You care about security. So do we.