<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 20 April 2018 at 07:45,  <span dir="ltr"><<a href="mailto:Vincent.Blondeau@lamresearch.com" target="_blank">Vincent.Blondeau@lamresearch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>





<div lang="EN-US">
<div class="gmail-m_-3373114830694829978WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><b>From:</b> Vm-dev [mailto:<a href="mailto:vm-dev-bounces@lists.squeakfoundation.org" target="_blank">vm-dev-bounces@lists.<wbr>squeakfoundation.org</a>]
<b>On Behalf Of </b>Eliot Miranda<br>
<b>Sent:</b> Thursday, April 19, 2018 14:08<br>
<b>To:</b> Open Smalltalk Virtual Machine Development Discussion <<a href="mailto:vm-dev@lists.squeakfoundation.org" target="_blank">vm-dev@lists.<wbr>squeakfoundation.org</a>><br>
<b>Subject:</b> Re: [Vm-dev] VM debugging - breakpoint issue on Windows<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">Hi Vincent,<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> On Apr 19, 2018, at 1:49 PM, <<a href="mailto:Vincent.Blondeau@lamresearch.com" target="_blank">Vincent.Blondeau@lamresearch.<wbr>com</a>> <<a href="mailto:Vincent.Blondeau@lamresearch.com" target="_blank">Vincent.Blondeau@lamresearch.<wbr>com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> Hi all,<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> So I tested an hello world project, by trying different compilation options. Knowing that the ones that are in use to generate the .exe are:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> -mwindows -m32 -mthreads -Wl,--large-address-aware,--<wbr>dynamicbase,--nxcompat,--<wbr>export-all-symbols<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> I identified that having all the options expect export-all-symbols, works perfectly.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> And having all the options except dynamicbase works too.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">Great, thanks!<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> I suppose that the options of the linker dynamicbase and export-all-symbols are conflicting and avoid to debug the app.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> I will try to remove one and retry with the VM.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">>  <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">> BTW, I have no idea of what these options do…<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">export-all-symbols tells the linker that all non-static symbols should be made available to dlls.  In Windows, exporting is by a funky mechanism, an export table, instead of, as in Unix, by run-time/load-time linking. 
 Using export-all-symbols avoids us having to use a .def file to specify the exports we need.  So if you find out that things work properly without export-all-symbols then we shall have to maintain a .def file.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">Bah...<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal">I removed both options and recompiled, your breakpoint is reached  in parseVMArgs !<u></u><u></u></p>
<p class="MsoNormal"><u></u> </p></div></div></blockquote><div><br></div><div>Did that the produce a DEF file? which gdb would have loaded symbols from?</div><div><br></div><div>With the original compile options, did you try...</div><div>$ gdb <executable><br></div><div><div>> dll-symbols <dllname.dll></div></div><div><br></div><div>per libin_v's answer here...</div><div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://www.experts-exchange.com/questions/23792765/How-to-debug-a-DLL-using-MinGW.html">https://www.experts-exchange.com/questions/23792765/How-to-debug-a-DLL-using-MinGW.html</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">(disclaimer, I'm not familiar with it.  Its just interesting to search around learning more about it.)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">-------------</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Also, here is a suggestion that dynamicbase Address Space Layout Randomization may cause a problem with gdb (maybe a gdb bug)</div><div style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><a href="https://lists.gnu.org/archive/html/qemu-discuss/2016-04/msg00043.html">https://lists.gnu.org/archive/html/qemu-discuss/2016-04/msg00043.html</a><br></div><div style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">cheers -ben</div><br></div></div></div></div>