<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>><span style="font-size: 12pt;">I don't think that any tool currently depends on parsing that syntax and I agree that using the mathematical [x,y) notation makes most sense here. It would be great >to wrap this in a formatDWARFrange() function, so we can
 be consistent everywhere (and in case it really turns out that I need to produce darwin-dwarfdump >compatible output at one point, we have one point where this can easily be parameterized).</span></p>
<div style="word-wrap:break-word">
<div>
<div class="">> </div>
<div class="">>-- adrian</div>
<div class=""><br>
</div>
<div class="">I took a look on output that llvm-dwarfdump produces and it is really not consistent now:<br>
</div>
<div class=""><br>
</div>
<div class="">
<div>// DWARF: .debug_aranges contents:</div>
<div>// DWARF-NEXT: Address Range Header: length = 0x00000024, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00</div>
<div>// DWARF-NEXT: [0x00000000 - 0x00000004)</div>
<div>// DWARF-NEXT: [0x00000000 - 0x00000004)<br>
</div>
<div><br>
</div>
<div>
<div># CHECK: .debug_ranges contents:</div>
<div># CHECK:   00000000 0000000000000000 0000000000000001</div>
<div># CHECK:   00000000 0000000000000000 0000000000000002</div>
<div># CHECK:   00000000 <End of list>​<br>
</div>
<br>
</div>
<div>
<div>CHECK:        DW_AT_ranges [DW_FORM_sec_offset]     (0x00000000</div>
<div>CHECK:           [0x0000000100000f94 - 0x0000000100000f9a)</div>
<div>CHECK:           [0x0000000100000f9f - 0x0000000100000fa7))<br>
</div>
<br>
</div>
And output for .gdb_index after landing this patch will be:</div>
<div class="">
<div>; CHECK:      Address area offset = 0x38, has 2 entries:</div>
<div>; CHECK-NEXT:   Low/High address = [0x4000e8, 0x4000f3) (Size: 0xb), CU id = 0</div>
<div>; CHECK-NEXT:   Low/High address = [0x4000f3, 0x4000fe) (Size: 0xb), CU id = 1<br>
</div>
<div><br>
</div>
<div>So we will have 3 different formats now:<br>
</div>
<div>1) [A - B)<br>
</div>
<div>2) A B<br>
</div>
<div class="">3) [A, B)<br>
</div>
<div class=""><br>
</div>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">formatDWARFrange</span>​() or something alike seems good idea to have. I can probably prepare a patch for this a bit later</div>
<div class="">and now going to commit this one with [A, B) change since this format looks acceptable for everyone and seems will be</div>
<div class="">a first user of mathematical notation for ranges output.<br class="">
<div>
<blockquote type="cite" class="">
<div class=""></div>
</blockquote>
</div>
George.<br>
</div>
</div>
</div>
</body>
</html>