<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 8, 2018, at 12:54 PM, Leonard Mosescu via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div style="line-height:18px" class=""><div class=""><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">What is the governing</span> <span style="white-space:pre" class="">philosophy around making changes to the SB API? The "</span></font></span><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><a href="http://lldb.llvm.org/SB-api-coding-rules.html" style="white-space:pre" class="">SB API Coding Rules</a><span style="white-space:pre" class="">"</span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">page establishes the practices on how to avoid introducing accidental incompatibility, but what </span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">about the cases where there's a case for intentionally making changes?</span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class=""><br class=""></span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">For example, </span></font><span style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class="">I'd like to make a small change to SBTarget to allow surfacing errors during LoadCore():</span></div><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class=""><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class=""><br class=""></span></span></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div style="line-height:18px" class=""><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class=""><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class="">SBProcess </span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(121,94,38)" class="">SBTarget::LoadCore</span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class="">(</span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,0,255)" class="">const</span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class=""> </span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,0,255)" class="">char</span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class=""> </span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class="">*</span><span style="font-size:small;font-weight:400;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class="">core_file</span><span style="font-size:small;font-weight:400;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial" class="">)</span></span></div></div></blockquote><div style="line-height:18px" class=""><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class=""><br class=""></span></div><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class="">And add an explicit out error parameter (in line with SBTarget::Attach(), Launch(), ...):</span></div><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class=""><br class="gmail-Apple-interchange-newline"></span></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div style="line-height:18px" class=""><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="font-weight: normal;" class="">SBProcess </span><span style="font-weight:normal;color:rgb(121,94,38)" class="">SBTarget::LoadCore</span><span style="font-weight: normal;" class="">(</span><span style="font-weight:normal;color:rgb(0,0,255)" class="">const</span><span style="font-weight: normal;" class=""> </span><span style="font-weight:normal;color:rgb(0,0,255)" class="">char</span><span style="font-weight: normal;" class=""> </span><span style="font-weight: normal;" class="">*</span><span style="" class="">core_file<b class="">, SBError </b></span><span style="" class=""><b class="">&</b></span><span style="" class=""><b class="">error</b>)</span></div><div style="font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"; white-space: pre;" class=""><span style="" class=""><br class=""></span></div></div></blockquote><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">If the rule is to strictly avoid any kind of changes then I'd have to resort to</span></font><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">a COM-like versioning and introduce a new SBTarget::LoadCore2 (or LoadCoreEx, ... pick</span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">your poison, I'm not set on any name) while also keeping the existing LoadCore().</span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class=""><br class=""></span></font></div><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class="">Any guidance on this? Thanks!</span></font><br class=""><div class=""><font face="Droid Sans Mono, monospace, monospace, Droid Sans Fallback" class=""><span style="white-space:pre" class=""><br class=""></span></font></div></div></div></div></blockquote><div><br class=""></div>Just add an extra overloaded version of LoadCore. We don't want people's code to not link and since Apple uses a LLDBRPC.framework that sub-launches a lldb-rpc-server which can connect to older LLDB.framework binaries, we can't remove functions.</div><div><br class=""></div><div>Greg</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><br class=""></div></div></div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></body></html>