<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Vincent,<br><br></div><div><br>On Apr 18, 2018, at 11:33 AM, <<a href="mailto:Vincent.Blondeau@lamresearch.com">Vincent.Blondeau@lamresearch.com</a>> <<a href="mailto:Vincent.Blondeau@lamresearch.com">Vincent.Blondeau@lamresearch.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to set up a breakpoint in the VM but I got this error when running:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Cannot insert breakpoint 1.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Error accessing memory address 0x509cad: Input/output error.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For this, I am using gdb under Cygwin (same issue with powershell) and invoque the primitive I want to test:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console";color:#BFBF00">pharo.cog.spur/builddbg/vm
</span><span style="font-size:9.0pt;font-family:"Lucida Console"">$  gdb --args ./Pharo.exe â€“headless ../..somewhereOnMyDisk.../Pharo.image eval "FilePluginPrims new primitiveStdioDescriptorIsATTY."<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I get these results:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">GNU gdb (GDB) 7.6.1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Reading symbols from C:\Users\BlondVi\Documents\GitRepos\opensmalltalk-vm\build.win32x86\pharo.cog.spur\builddbg\vm\Pharo.exe...done.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Next, I set a breakpoint in the primitive C method I created and run the app:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">(gdb) br sqStdioDescriptorIsATTY<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Breakpoint 1 at 0x509cb6: file ../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c, line 337.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">(gdb) r<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Starting program: C:\Users\BlondVi\Documents\GitRepos\opensmalltalk-vm\build.win32x86\pharo.cog.spur\builddbg\vm/./Pharo.exe --headless
 ../../../../../../../../..temp/logoVM/logoVM.image eval "FilePluginPrims new primitiveStdioDescriptorIsATTY."<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">[New Thread 27416.0x95bc]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">[New Thread 27416.0xa1d0]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">[New Thread 27416.0x3aa4]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">[New Thread 27416.0x88bc]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">(gdb) Warning:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Cannot insert breakpoint 1.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">Error accessing memory address 0x509cad: Input/output error.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What should I do to set the breakpoint correctly?</p></div></div></blockquote><div><br></div>AFAICT you're doing everything right.  But if you're on 64-bit Cygwin then it won't work.  You can build the 32-bit vm on a 64-bit windows but gdb can only be used to debug 64-bit programs.  Even installing the gdb from 32-bit Cygwin doesn't work.  So if this is your configuration you'll have the create a 32-but Cygwin and debug the 32-bit app there-on.<div><br></div><div>HTH</div><div><br><blockquote type="cite"><div><div class="WordSection1"><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Vincent Blondeau<span style="font-size:9.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>


</div></blockquote></div></body></html>