<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Re-ping! If we plan to use dwarfdump in the tests in the future this needs to be fixed one way or another.<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>- Jan<br><br><div style="font-family: Courier New,monaco,monospace,sans-serif; font-size: 10pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Jan Sjodin <jan_sjodin@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> Anton Korobeynikov <anton@korobeynikov.info><br><b><span style="font-weight: bold;">Cc:</span></b> llvm-commits@cs.uiuc.edu<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, March 8, 2011 11:46:52 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [llvm-commits] Change DwarfUsesAbsoluteLabelForStmtList
to false for X86ELFMCAsmInfo.<br></font><br>
Ping!<br><br>- Jan<br><br><br><br>----- Original Message ----<br>> From: Jan Sjodin <<a ymailto="mailto:jan_sjodin@yahoo.com" href="mailto:jan_sjodin@yahoo.com">jan_sjodin@yahoo.com</a>><br>> To: Anton Korobeynikov <<a ymailto="mailto:anton@korobeynikov.info" href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>><br>> Cc: <a ymailto="mailto:llvm-commits@cs.uiuc.edu" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>> Sent: Sat, February 26, 2011 9:40:31 AM<br>> Subject: Re: [llvm-commits] Change DwarfUsesAbsoluteLabelForStmtList to false <br>>for X86ELFMCAsmInfo.<br>> <br>> <br>> <br>> <br>> ----- Original Message ----<br>> > From: Anton Korobeynikov <<a ymailto="mailto:anton@korobeynikov.info" href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>><br>> > To: Jan Sjodin <<a ymailto="mailto:jan_sjodin@yahoo.com"
href="mailto:jan_sjodin@yahoo.com">jan_sjodin@yahoo.com</a>><br>> > Cc: <a ymailto="mailto:llvm-commits@cs.uiuc.edu" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>> > Sent: Sat, February 26, 2011 7:36:00 AM<br>> > Subject: Re: [llvm-commits] Change DwarfUsesAbsoluteLabelForStmtList to <br>>false <br>><br>> >for X86ELFMCAsmInfo.<br>> > <br>> > Hello Jan,<br>> > <br>> > > Dwarfdump gives an error and gdb fails when generating code in memory <br>>(but<br>> > > happens to accept it in a .o file) in Linux when<br>> > > DwarfUsesAbsoluteLabelForStmtList = true, this patch sets it to false to <br><br>> fix<br>> > > this issue. I don't know if this is true for other targets, but the <br>>change <br>><br>> >is<br>> > > limited to X86ELFMCAsmInfo.<br>>
> How the patch was tested? How we might be sure this won't break non JIT <br>>case?<br>> > <br>> > -- <br>> > With best regards, Anton Korobeynikov<br>> > Faculty of Mathematics and Mechanics, Saint Petersburg State University<br>> ><br>> <br>> The question you are really asking is if there is a bug in dwarfdump or a bug <br>>in <br>><br>> llvm, because dwarfdump always complains. I tried this on Linux 64-bit with <br>> clang and llvm trunk:<br>> <br>> file empty.c:<br>> ---------------------------------------------------------------<br>> <br>> int main()<br>> {<br>> return 42;<br>> }<br>> ---------------------------------------------------------------<br>> <br>> Compile and run dwarfdump:<br>> ---------------------------------------------------------------<br>>
> clang -c -g -emit-llvm -o empty.bc empty.c<br>> > llc -filetype=obj empty.bc<br>> > dwarfdump empty.o <br>> <br>> .debug_info<br>> <br>> COMPILE_UNIT<header overall offset = 0>:<br>> <0>< 11> DW_TAG_compile_unit<br>> DW_AT_producer clang version 2.9 (trunk 126545)<br>> DW_AT_language DW_LANG_C99<br>> DW_AT_name empty.c<br>> DW_AT_entry_pc 0x0<br>> DW_AT_stmt_list 0x0<br>> DW_AT_comp_dir
<br>>/home/jsjodin/Work/LLVM/Sandboxes/TOT/test<br>> <br>> LOCAL_SYMBOLS:<br>> <1>< 114> DW_TAG_base_type<br>> DW_AT_encoding DW_ATE_signed<br>> DW_AT_name int<br>> DW_AT_byte_size 4<br>> <1>< 121> DW_TAG_subprogram<br>> DW_AT_name main<br>> DW_AT_decl_file 1<br>> DW_AT_decl_line 2<br>>
DW_AT_type <114><br>> DW_AT_external yes(1)<br>> DW_AT_low_pc 0x0<br>> DW_AT_high_pc 0xe<br>> DW_AT_frame_base DW_OP_reg7<br>> AT of 16359 (0x3fe7) is unknown to dwarfdump. Continuing. <br>> <Unknown AT value 0x3fe7> yes(1)<br>> <br>> .debug_line: line number info for a single cu<br>> dwarfdump ERROR: dwarf_srclines: DW_DLE_ATTR_FORM_BAD (114)<br>> ---------------------------------------------------------------<br>> <br>> dwarfdump cleary doesn't like
what llc has produced. With the patch applied we <br>><br>> try again:<br>> <br>> ---------------------------------------------------------------<br>> .debug_info<br>> <br>> COMPILE_UNIT<header overall offset = 0>:<br>> <0>< 11> DW_TAG_compile_unit<br>> DW_AT_producer clang version 2.9 (trunk 126545)<br>> DW_AT_language DW_LANG_C99<br>> DW_AT_name empty.c<br>> DW_AT_entry_pc 0x0<br>> DW_AT_stmt_list 0<br>> DW_AT_comp_dir
<br>>/home/jsjodin/Work/LLVM/Sandboxes/TOT/test<br>> <br>> LOCAL_SYMBOLS:<br>> <1>< 110> DW_TAG_base_type<br>> DW_AT_encoding DW_ATE_signed<br>> DW_AT_name int<br>> DW_AT_byte_size 4<br>> <1>< 117> DW_TAG_subprogram<br>> DW_AT_name main<br>> DW_AT_decl_file 1 <br>> /home/jsjodin/Work/LLVM/Sandboxes/TOT/test/empty.c<br>> DW_AT_decl_line
2<br>> DW_AT_type <110><br>> DW_AT_external yes(1)<br>> DW_AT_low_pc 0x0<br>> DW_AT_high_pc 0xe<br>> DW_AT_frame_base DW_OP_reg7<br>> AT of 16359 (0x3fe7) is unknown to dwarfdump. Continuing. <br>> <Unknown AT value 0x3fe7> yes(1)<br>> <br>> .debug_line: line number info for a single cu<br>> Source lines (from CU-DIE at .debug_info offset 11):<br>> <source> [row,column]
<pc> //<new statement or basic block<br>> /home/jsjodin/Work/LLVM/Sandboxes/TOT/test/empty.c: [ 2,-1] 0x0 // <br>>new <br>><br>> statement<br>> /home/jsjodin/Work/LLVM/Sandboxes/TOT/test/empty.c: [ 3, 3] 0xd // <br>>new <br>><br>> statement<br>> /home/jsjodin/Work/LLVM/Sandboxes/TOT/test/empty.c: [ 3, 3] 0xe // <br>>new <br>><br>> statement // end of text sequence<br>> <br>> .debug_pubnames<br>> global main die-in-sect 117, cu-in-sect 11, die-in-cu 117, <br>> cu-header-in-sect 0<br>> <br>> .debug_macinfo<br>> <br>> .debug_loc format <i o b e l> means index section-offset begin-addr end-addr <br>> length-of-block-entry<br>> <br>>
.debug_abbrev<br>> < 1>< 0><code: 1> DW_TAG_compile_unit DW_children_yes<br>> < 3> DW_AT_producer DW_FORM_string<br>> < 5> DW_AT_language DW_FORM_data2<br>> < 7> DW_AT_name DW_FORM_string<br>> < 9> DW_AT_entry_pc DW_FORM_addr<br>> < 11> DW_AT_stmt_list DW_FORM_data4<br>> < 13> DW_AT_comp_dir
DW_FORM_string<br>> < 2>< 17><code: 2> DW_TAG_base_type DW_children_no<br>> < 20> DW_AT_encoding DW_FORM_data1<br>> < 22> DW_AT_name DW_FORM_string<br>> < 24> DW_AT_byte_size DW_FORM_data1<br>> < 3>< 28><code: 3> DW_TAG_subprogram DW_children_no<br>> < 31> DW_AT_name DW_FORM_string<br>> < 33> DW_AT_decl_file
DW_FORM_data1<br>> < 35> DW_AT_decl_line DW_FORM_data1<br>> < 37> DW_AT_type DW_FORM_ref4<br>> < 39> DW_AT_external DW_FORM_flag<br>> < 41> DW_AT_low_pc DW_FORM_addr<br>> < 43> DW_AT_high_pc DW_FORM_addr<br>> < 45> DW_AT_frame_base DW_FORM_block1<br>> < 47> AT of 16359 (0x3fe7)
is unknown to dwarfdump. Continuing. <br>> <Unknown AT value 0x3fe7> DW_FORM_flag<br>> < 4>< 52><code: 0> null .debug_abbrev entry<br>> <br>> .debug_string<br>> <br>> .debug_aranges<br>> <br>> .debug_frame<br>> <br>> fde:<br>> < 0><0x0:0xe><main><fde offset 0x14 length: 0x14><eh offset none><br>> 0x00000000: <off cfa=08(r7) > <off r16=-8(cfa) > <br>> <br>> .debug_static_func<br>> <br>> .debug_static_vars<br>> <br>> .debug_pubtypes<br>> <br>> .debug_weaknames<br>> ---------------------------------------------------------------<br>> <br></div></div>
</div></body></html>