<div dir="auto">Hi Eliot,<div dir="auto">Mingw-w64 is a fork of mingw. It works for both 32 and 64 bits, contrarily to mingw which wad stuck to 32bits at the time of fork. I tjink that -w64- just refers to that.</div></div><br><div class="gmail_quote"><div dir="ltr">Le jeu. 19 avr. 2018 à 20:39, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr">Hi Vincent,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 19, 2018 at 11:27 AM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank" rel="noreferrer">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Vincent,<div class="gmail_extra"><br><div class="gmail_quote"><span class="m_-1229464441132059856gmail-">On Thu, Apr 19, 2018 at 9:30 AM,  <span dir="ltr"><<a href="mailto:Vincent.Blondeau@lamresearch.com" target="_blank" rel="noreferrer">Vincent.Blondeau@lamresearch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br>
Hi Dave,<br>
<br>
The optimization options are already disabled in the debug build and -ggdb2 is used. So, the real code is used.<br>
<br>
How do I change the build in a way that the plugin is external?<br></blockquote><div><br></div></span><div>I see the same issue as you.  I'll take a look.</div></div></div></div></blockquote><div><br></div><div>Something I find strange is TOOLPREFIX:=i686-w64-mingw32-.  I would have expected  TOOLPREFIX:=i686-w32-mingw32-. Nicolas, have you looked at this recently?</div><div><br></div><div>Vincent, if you try compiling a Hello World and setting breakpoint in main you should be able to reproduce the issue.  Then you can try different compilers quickly.  I tried debugging the VM and putting a breakpoint in parseVMArgs, which is called to parse the command line.  It fails also.  So we have a problem :-(</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="m_-1229464441132059856gmail-h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Any experience is always welcome! Thanks! <br>
<br>
Vincent<br>
<div class="m_-1229464441132059856gmail-m_2876381275230258179HOEnZb"><div class="m_-1229464441132059856gmail-m_2876381275230258179h5"><br>
<br>
-----Original Message-----<br>
From: Vm-dev [mailto:<a href="mailto:vm-dev-bounces@lists.squeakfoundation.org" target="_blank" rel="noreferrer">vm-dev-bounces@lists.squeakfoundation.org</a>] On Behalf Of David T. Lewis<br>
Sent: Wednesday, April 18, 2018 17:35<br>
To: Open Smalltalk Virtual Machine Development Discussion <<a href="mailto:vm-dev@lists.squeakfoundation.org" target="_blank" rel="noreferrer">vm-dev@lists.squeakfoundation.org</a>><br>
Subject: Re: [Vm-dev] VM debugging - breakpoint issue on Windows<br>
<br>
<br>
Hi Vincent,<br>
<br>
I am not a Windows user so this may be completely wrong, but one thing I have found in debugging plugins on Linux is that it is often necessary to compile with optimization turned off so that the debugger is dealing with the "real" code.<br>
<br>
I am guessing that perhaps your debugger is trying to use the C source code to locate something that got optimized away by the compiler.<br>
<br>
Sometimes it is helpful to compile the plugin as an external plugin (a DLL). You can compile it with zero optimization and compiler flags set (-O0 -g or similar), and the resulting plugun should be visible to the debugger. The plugin that you compile this way should work with any VM (optimized or not) and the debugger should still be able to see it.<br>
<br>
I have not done this on Windows, but that is my experience on Linux so maybe it will help.<br>
<br>
Dave<br>
<br>
<br>
On Wed, Apr 18, 2018 at 06:33:12PM +0000, <a href="mailto:Vincent.Blondeau@lamresearch.com" target="_blank" rel="noreferrer">Vincent.Blondeau@lamresearch.com</a> wrote:<br>
>  <br>
> Hi,<br>
> <br>
> I would like to set up a breakpoint in the VM but I got this error when running:<br>
> Cannot insert breakpoint 1.<br>
> Error accessing memory address 0x509cad: Input/output error.<br>
> <br>
> For this, I am using gdb under Cygwin (same issue with powershell) and invoque the primitive I want to test:<br>
> pharo.cog.spur/builddbg/vm $  gdb --args ./Pharo.exe -headless ../..somewhereOnMyDisk.../Pharo.image eval "FilePluginPrims new primitiveStdioDescriptorIsATTY."<br>
> <br>
> I get these results:<br>
> GNU gdb (GDB) 7.6.1<br>
> Reading symbols from C:\Users\BlondVi\Documents\GitRepos\opensmalltalk-vm\build.win32x86\pharo.cog.spur\builddbg\vm\Pharo.exe...done.<br>
> <br>
> Next, I set a breakpoint in the primitive C method I created and run the app:<br>
> <br>
> (gdb) br sqStdioDescriptorIsATTY<br>
> Breakpoint 1 at 0x509cb6: file ../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c, line 337.<br>
> (gdb) r<br>
> 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."<br>
> [New Thread 27416.0x95bc]<br>
> [New Thread 27416.0xa1d0]<br>
> [New Thread 27416.0x3aa4]<br>
> [New Thread 27416.0x88bc]<br>
> (gdb) Warning:<br>
> Cannot insert breakpoint 1.<br>
> Error accessing memory address 0x509cad: Input/output error.<br>
> <br>
> What should I do to set the breakpoint correctly?<br>
> <br>
> Thanks in advance,<br>
> <br>
> Vincent Blondeau<br>
> <br>
<br>
</div></div></blockquote></div></div></div><span class="m_-1229464441132059856gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-1229464441132059856gmail-m_2876381275230258179gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-1229464441132059856gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
</blockquote></div>