[Vm-dev] VM debugging - breakpoint issue on Windows

Vincent.Blondeau at lamresearch.com Vincent.Blondeau at lamresearch.com
Wed Apr 18 21:55:26 UTC 2018



From: Vm-dev [mailto:vm-dev-bounces at lists.squeakfoundation.org] On Behalf Of Eliot Miranda
Sent: Wednesday, April 18, 2018 14:36
To: Open Smalltalk Virtual Machine Development Discussion <vm-dev at lists.squeakfoundation.org>
Subject: Re: [Vm-dev] VM debugging - breakpoint issue on Windows

Hi Vincent,


> On Apr 18, 2018, at 11:33 AM, <Vincent.Blondeau at lamresearch.com> <Vincent.Blondeau at lamresearch.com> wrote:
>
> Hi,
>
> I would like to set up a breakpoint in the VM but I got this error when running:
> Cannot insert breakpoint 1.
> Error accessing memory address 0x509cad: Input/output error.
>
> For this, I am using gdb under Cygwin (same issue with powershell) and invoque the primitive I want to test:
> pharo.cog.spur/builddbg/vm $  gdb --args ./Pharo.exe –headless ../..somewhereOnMyDisk.../Pharo.image eval "FilePluginPrims new primitiveStdioDescriptorIsATTY."
>
> I get these results:
> GNU gdb (GDB) 7.6.1
> Reading symbols from C:\Users\BlondVi\Documents\GitRepos\opensmalltalk-vm\build.win32x86\pharo.cog.spur\builddbg\vm\Pharo.exe...done.
>
> Next, I set a breakpoint in the primitive C method I created and run the app:
>
> (gdb) br sqStdioDescriptorIsATTY
> Breakpoint 1 at 0x509cb6: file ../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c, line 337.
> (gdb) r
> 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."
> [New Thread 27416.0x95bc]
> [New Thread 27416.0xa1d0]
> [New Thread 27416.0x3aa4]
> [New Thread 27416.0x88bc]
> (gdb) Warning:
> Cannot insert breakpoint 1.
> Error accessing memory address 0x509cad: Input/output error.
>
> What should I do to set the breakpoint correctly?

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.

I am debugging the 32 bits Pharo under this Cygwin:
$ CYGWIN_NT-10.0-WOW 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
It is 32 bits too. So, it should work? Or if I have well understood your last sentence, I should I get a 32 bits gdb? How?

Vincent

PS: I am receiving most of the replies as email attachment in my outlook browser. Has someone the same issue?

HTH

>
> Thanks in advance,
>
> Vincent Blondeau
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180418/88fe0478/attachment-0001.html>


More information about the Vm-dev mailing list