<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;">
<div style="color: rgb(33, 33, 33);">
<div>
<div dir="ltr">
<div class="gmail_quote">
<div>> I think Eric's point is that the gdb_index isn't required for or only useful for Fission. You could have a gdb_index in a non-fission build (to speed up the debugger so it > doesn't have to read all the DWARF at load time) or skip the index in a fission
 build (to reduce executable size at the expense of slower gdb startup time)<br>
  <br>
</div>
<div>I see. I did not think about such cases. How will this work ?<br>
</div>
<div><br>
</div>
<div>1) <span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
I supposed that if gdb</span><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"> see .gdb_index section then it </span><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">should
 try to locate .dwo files to read info from.</span></div>
<div>     If I have gdb_index in a non-fission executable binary, will debugger read <span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">gdb_index</span> and start
 up fast and later read debug info from debug sections of executable when will need it ?<br>
</div>
<div><br>
</div>
<div>2) If we skip gdb_index in a fission build then there should be very little amount of debug information in binary and I supposed that debugger will not try to locate .dwo <span style="font-size: 12pt;">when there is no .gdb_index section. </span><span style="font-size: 12pt;">So
 it should be almost useless to debug such build, what I am missing ?</span></div>
<div><br>
</div>
<div>And finally, since this file has functionality of creating .gdb_index and linker option is also called --gdb-index, what about GdbIndex.cpp/h name ?<br>
</div>
<div><br>
</div>
<div>> It would possibly be better to make the common implementation in LLVM more flexible to this use case and more efficient - this could have benefits for other LLVM >tools (like LLDB, llvm-dsymutil, and llvm-dwp)<br>
>If that means splitting up parts of the API so they can be used independently, providing ways to provide the contents of sections already available through other >means, etc, - those seem like reasonable changes to make to the common APIs.<br>
><br>
>- Dave</div>
<div> <br>
</div>
<div>Yes, probably. But that is also can be separate and large task itself. I think we can work on changing common API and switch lld to use it later, when whole functionality of .gdb_index be landed (since it is probably complete in D24267). Then we will have
 full picture of what exactly we want to have from API from linker side and also probably should be able to swich step by step and perform benchmarks to compare common llvm implementation with what we may have in LLD.<br>
</div>
<div><br>
</div>
<div>George.<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>