Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints are not stopped for using CGO on Windows #2800

Closed
annomel opened this issue Nov 18, 2021 · 3 comments
Closed

Breakpoints are not stopped for using CGO on Windows #2800

annomel opened this issue Nov 18, 2021 · 3 comments

Comments

@annomel
Copy link

annomel commented Nov 18, 2021

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.

sample: github.com/kyleconroy/hello-cgo

  1. What version of Delve are you using (dlv version)?
    Delve Debugger Version: 1.7.2
  2. What version of Go are you using? (go version)?
    go version go1.17.3 windows/amd64
  3. What operating system and processor architecture are you using?
    windows 10 amd64
  4. What did you do?
    built using msys2 installed with base-devel, mingw-w64-i686-toolchain, mingw-w64-x86_64-toolchain packages. And go separately installed

go build -o helloc.exe

I tried to debug github.com/kyleconroy/hello-cgo using Run and Debug button
5. What did you expect to see?
debugger to stop at breakpoints
6. What did you see instead?
vscode doesn't stop at breakpoints

I see "could not find the file f:\testing\cgo\hello.go" tooltips on the breakpoints while the process is running.

Debug Console:

Starting: C:\Users\DrDr\go\bin\dlv-dap.exe dap --check-go-version=false --listen=127.0.0.1:55868 from f:\testing\cgo
DAP server listening at: 127.0.0.1:55868
Type 'dlv help' for list of commands.
Hello CGO!
Process 5280 has exited with status 0
Detaching
dlv dap (9840) exited with code: 0
@aarzilli
Copy link
Member

I think this is a duplicate of #2786. Check which version of mingw64 you are using.

@annomel
Copy link
Author

annomel commented Nov 19, 2021

Sorry this issue could be a duplicate. Close it if you agree.

gcc.exe (Rev2, Built by MSYS2 project) 11.2.0
GNU ld (GNU Binutils) 2.37

$ pacman -Q
asciidoc 9.1.1-1
autoconf 2.71-1
autoconf2.13 2.13-3
autogen 5.18.16-1
automake-wrapper 11-1
automake1.10 1.10.3-4
automake1.11 1.11.6-4
automake1.12 1.12.6-4
automake1.13 1.13.4-5
automake1.14 1.14.1-4
automake1.15 1.15.1-2
automake1.16 1.16.3-1
automake1.6 1.6.3-3
automake1.7 1.7.9-3
automake1.8 1.8.5-4
automake1.9 1.9.6-3
base 2020.12-1
bash 5.1.008-1
bash-completion 2.11-1
bison 3.8.2-1
brotli 1.0.9-2
bsdtar 3.5.2-1
btyacc 20210619-1
bzip2 1.0.8-2
ca-certificates 20210119-3
coreutils 8.32-2
curl 7.79.1-1
dash 0.5.11.4-1
db 5.3.28-3
diffstat 1.64-1
diffutils 3.8-1
docbook-xml 4.5-2
docbook-xsl 1.79.2-1
dos2unix 7.4.2-1
expat 2.4.1-1
file 5.41-1
filesystem 2021.06-2
findutils 4.8.0-1
flex 2.6.4-1
gawk 5.1.0-1
gcc-libs 10.2.0-1
gdb 10.2-3
gdbm 1.22-1
getent 2.18.90-2
gettext 0.19.8.1-1
gettext-devel 0.19.8.1-1
glib2 2.68.4-1
gmp 6.2.1-1
gnupg 2.2.32-2
gperf 3.1-2
grep 1~3.0-3
groff 1.22.4-1
gzip 1.11-1
heimdal 7.7.0-2
heimdal-libs 7.7.0-2
help2man 1.48.5-1
icu 69.1-1
inetutils 1.9.4-2
info 6.8-1
intltool 0.51.0-2
less 590-1
libarchive 3.5.2-1
libargp 20110921-2
libasprintf 0.19.8.1-1
libassuan 2.5.5-1
libatomic_ops 7.6.12-1
libbz2 1.0.8-2
libcrypt 2.1-3
libcurl 7.79.1-1
libdb 5.3.28-3
libedit 20210910_3.1-1
libexpat 2.4.1-1
libffi 3.3-1
libgc 8.0.6-1
libgcrypt 1.9.4-1
libgdbm 1.22-1
libgettextpo 0.19.8.1-1
libgnutls 3.7.2-1
libgpg-error 1.42-1
libgpgme 1.16.0-1
libguile 2.2.7-1
libhogweed 3.7.3-1
libiconv 1.16-2
libiconv-devel 1.16-2
libidn2 2.3.2-1
libintl 0.19.8.1-1
libksba 1.6.0-1
libltdl 2.4.6-11
liblz4 1.9.3-1
liblzma 5.2.5-1
libmetalink 0.1.3-3
libnettle 3.7.3-1
libnghttp2 1.46.0-1
libnpth 1.6-1
libopenssl 1.1.1.l-1
libp11-kit 0.24.0-1
libpcre 8.45-1
libpcre16 8.45-1
libpcre2_16 10.37-1
libpcre2_32 10.37-1
libpcre2_8 10.37-1
libpcre2posix 10.37-1
libpcre32 8.45-1
libpcrecpp 8.45-1
libpcreposix 8.45-1
libpipeline 1.5.3-2
libpsl 0.21.1-2
libreadline 8.1.001-1
libsqlite 3.36.0-2
libssh2 1.10.0-1
libtasn1 4.17.0-2
libtool 2.4.6-11
libunistring 0.9.10-1
libunrar 6.0.7-1
libunrar-devel 6.0.7-1
libutil-linux 2.35.2-1
libxml2 2.9.12-2
libxslt 1.1.34-4
libxxhash 0.8.0-1
libzstd 1.5.0-1
m4 1.4.19-1
make 4.3-1
man-db 2.9.4-1
mingw-w64-i686-binutils 2.37-4
mingw-w64-i686-bzip2 1.0.8-2
mingw-w64-i686-ca-certificates 20210119-1
mingw-w64-i686-crt-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-expat 2.4.1-1
mingw-w64-i686-gcc 11.2.0-2
mingw-w64-i686-gcc-ada 11.2.0-2
mingw-w64-i686-gcc-fortran 11.2.0-2
mingw-w64-i686-gcc-libgfortran 11.2.0-2
mingw-w64-i686-gcc-libs 11.2.0-2
mingw-w64-i686-gcc-objc 11.2.0-2
mingw-w64-i686-gdb 11.1-2
mingw-w64-i686-gdb-multiarch 11.1-2
mingw-w64-i686-gettext 0.19.8.1-10
mingw-w64-i686-gmp 6.2.1-2
mingw-w64-i686-headers-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-isl 0.24-1
mingw-w64-i686-libffi 3.3-4
mingw-w64-i686-libgccjit 11.2.0-2
mingw-w64-i686-libiconv 1.16-2
mingw-w64-i686-libmangle-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-libsystre 1.0.1-4
mingw-w64-i686-libtasn1 4.17.0-1
mingw-w64-i686-libtre-git r128.6fb7206-2
mingw-w64-i686-libwinpthread-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-make 4.3-1
mingw-w64-i686-mpc 1.2.1-1
mingw-w64-i686-mpdecimal 2.5.1-1
mingw-w64-i686-mpfr 4.1.0.p13-1
mingw-w64-i686-ncurses 6.2-4
mingw-w64-i686-openssl 1.1.1.l-1
mingw-w64-i686-p11-kit 0.24.0-1
mingw-w64-i686-pkgconf 1.8.0-2
mingw-w64-i686-python 3.9.7-3
mingw-w64-i686-readline 8.1.001-1
mingw-w64-i686-sqlite3 3.36.0-1
mingw-w64-i686-tcl 8.6.11-5
mingw-w64-i686-termcap 1.3.1-6
mingw-w64-i686-tk 8.6.11.1-2
mingw-w64-i686-tools-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-tzdata 2021e-1
mingw-w64-i686-windows-default-manifest 6.4-3
mingw-w64-i686-winpthreads-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-winstorecompat-git 9.0.0.6346.6cc97775a-1
mingw-w64-i686-xxhash 0.8.0-1
mingw-w64-i686-xz 5.2.5-2
mingw-w64-i686-zlib 1.2.11-9
mingw-w64-i686-zstd 1.5.0-1
mingw-w64-x86_64-SDL2 2.0.16-2
mingw-w64-x86_64-aom 3.2.0-1
mingw-w64-x86_64-binutils 2.37-4
mingw-w64-x86_64-boost 1.77.0-2
mingw-w64-x86_64-brotli 1.0.9-4
mingw-w64-x86_64-bzip2 1.0.8-2
mingw-w64-x86_64-c-ares 1.17.2-1
mingw-w64-x86_64-ca-certificates 20210119-1
mingw-w64-x86_64-cairo 1.17.4-4
mingw-w64-x86_64-celt 0.11.3-4
mingw-w64-x86_64-ceres-solver 2.0.0-2
mingw-w64-x86_64-cppunit 1.15.1-2
mingw-w64-x86_64-crt-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-curl 7.80.0-1
mingw-w64-x86_64-dav1d 0.9.2-1
mingw-w64-x86_64-eigen3 3.3.9-1
mingw-w64-x86_64-expat 2.4.1-1
mingw-w64-x86_64-ffmpeg 4.4.1-1
mingw-w64-x86_64-ffms2 2.40-1
mingw-w64-x86_64-fontconfig 2.13.94-1
mingw-w64-x86_64-freeglut 3.2.1-2
mingw-w64-x86_64-freeimage 3.18.0-7
mingw-w64-x86_64-freetype 2.11.0-2
mingw-w64-x86_64-frei0r-plugins 1.7.0-3
mingw-w64-x86_64-fribidi 1.0.11-1
mingw-w64-x86_64-gavl 1.4.0-1
mingw-w64-x86_64-gcc 11.2.0-2
mingw-w64-x86_64-gcc-ada 11.2.0-2
mingw-w64-x86_64-gcc-fortran 11.2.0-2
mingw-w64-x86_64-gcc-libgfortran 11.2.0-2
mingw-w64-x86_64-gcc-libs 11.2.0-2
mingw-w64-x86_64-gcc-objc 11.2.0-2
mingw-w64-x86_64-gdb 11.1-2
mingw-w64-x86_64-gdb-multiarch 11.1-2
mingw-w64-x86_64-gettext 0.19.8.1-10
mingw-w64-x86_64-gflags 2.2.2-2
mingw-w64-x86_64-giflib 5.2.1-3
mingw-w64-x86_64-glib2 2.70.0-2
mingw-w64-x86_64-glog 0.5.0-2
mingw-w64-x86_64-glsl-optimizer-git r66917.d78c3d2f24-1
mingw-w64-x86_64-gmp 6.2.1-2
mingw-w64-x86_64-gnutls 3.7.2-4
mingw-w64-x86_64-graphite2 1.3.14-2
mingw-w64-x86_64-gsm 1.0.19-1
mingw-w64-x86_64-harfbuzz 3.0.0-1
mingw-w64-x86_64-hdf5 1.12.1-2
mingw-w64-x86_64-headers-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-hlsl2glsl-git r852.14dd189-1
mingw-w64-x86_64-icu 69.1-1
mingw-w64-x86_64-ilmbase 2.5.7-5
mingw-w64-x86_64-intel-tbb 1~2020.3-1
mingw-w64-x86_64-isl 0.24-1
mingw-w64-x86_64-jansson 2.14-1
mingw-w64-x86_64-jasper 2.0.33-1
mingw-w64-x86_64-jbigkit 2.1-4
mingw-w64-x86_64-jemalloc 5.2.1-2
mingw-w64-x86_64-jxrlib 1.1-3
mingw-w64-x86_64-l-smash 2.14.5-2
mingw-w64-x86_64-lame 3.100-1
mingw-w64-x86_64-lcms2 2.12-1
mingw-w64-x86_64-leptonica 1.81.1-1
mingw-w64-x86_64-lerc 3.0-2
mingw-w64-x86_64-libaec 1.0.6-1
mingw-w64-x86_64-libarchive 3.5.2-1
mingw-w64-x86_64-libass 0.15.2-2
mingw-w64-x86_64-libbluray 1.3.0-1
mingw-w64-x86_64-libcaca 0.99.beta19-7
mingw-w64-x86_64-libdatrie 0.2.12-1
mingw-w64-x86_64-libdeflate 1.8-2
mingw-w64-x86_64-libexif 0.6.23-1
mingw-w64-x86_64-libffi 3.3-4
mingw-w64-x86_64-libgccjit 11.2.0-2
mingw-w64-x86_64-libiconv 1.16-2
mingw-w64-x86_64-libidn2 2.3.1-1
mingw-w64-x86_64-libjpeg-turbo 2.1.1-1
mingw-w64-x86_64-libmangle-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-libmfx 1.25-1
mingw-w64-x86_64-libmodplug 0.8.9.0-4
mingw-w64-x86_64-libmysofa 1.2-1
mingw-w64-x86_64-libogg 1.3.5-1
mingw-w64-x86_64-libpng 1.6.37-6
mingw-w64-x86_64-libpsl 0.21.1-4
mingw-w64-x86_64-libraw 0.20.2-4
mingw-w64-x86_64-libsoxr 0.1.3-2
mingw-w64-x86_64-libssh2 1.10.0-1
mingw-w64-x86_64-libsystre 1.0.1-4
mingw-w64-x86_64-libtasn1 4.17.0-1
mingw-w64-x86_64-libthai 0.1.28-3
mingw-w64-x86_64-libtheora 1.1.1-6
mingw-w64-x86_64-libtiff 4.3.0-6
mingw-w64-x86_64-libtre-git r128.6fb7206-2
mingw-w64-x86_64-libunistring 0.9.10-4
mingw-w64-x86_64-libunwind 13.0.0-3
mingw-w64-x86_64-libvorbis 1.3.7-1
mingw-w64-x86_64-libvpx 1.10.0-1
mingw-w64-x86_64-libwebp 1.2.1-1
mingw-w64-x86_64-libwinpthread-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-libxml2 2.9.12-3
mingw-w64-x86_64-lz4 1.9.3-1
mingw-w64-x86_64-lzo2 2.10-2
mingw-w64-x86_64-make 4.3-1
mingw-w64-x86_64-metis 5.1.0-3
mingw-w64-x86_64-mpc 1.2.1-1
mingw-w64-x86_64-mpdecimal 2.5.1-1
mingw-w64-x86_64-mpfr 4.1.0.p13-1
mingw-w64-x86_64-ncurses 6.2-4
mingw-w64-x86_64-nettle 3.7.3-3
mingw-w64-x86_64-nghttp2 1.45.1-1
mingw-w64-x86_64-ogre3d 1.12.6-4
mingw-w64-x86_64-openal 1.21.1-3
mingw-w64-x86_64-openblas 0.3.18-2
mingw-w64-x86_64-opencore-amr 0.1.5-1
mingw-w64-x86_64-opencv 4.5.2-4
mingw-w64-x86_64-openexr 2.5.7-5
mingw-w64-x86_64-openjpeg2 2.4.0-2
mingw-w64-x86_64-openssl 1.1.1.l-1
mingw-w64-x86_64-opus 1.3.1-4
mingw-w64-x86_64-p11-kit 0.24.0-1
mingw-w64-x86_64-pango 1.48.10-1
mingw-w64-x86_64-pcre 8.45-1
mingw-w64-x86_64-pixman 0.40.0-2
mingw-w64-x86_64-pkgconf 1.8.0-2
mingw-w64-x86_64-protobuf 3.16.0-3
mingw-w64-x86_64-pugixml 1.11.4-1
mingw-w64-x86_64-python 3.9.7-3
mingw-w64-x86_64-readline 8.1.001-1
mingw-w64-x86_64-rtmpdump-git r514.c5f04a5-4
mingw-w64-x86_64-speex 1.2.0-1
mingw-w64-x86_64-speexdsp 1.2.0-1
mingw-w64-x86_64-sqlite3 3.36.0-1
mingw-w64-x86_64-srt 1.4.4-1
mingw-w64-x86_64-suitesparse 5.8.1-1
mingw-w64-x86_64-tcl 8.6.11-5
mingw-w64-x86_64-termcap 1.3.1-6
mingw-w64-x86_64-tesseract-ocr 4.1.1-8
mingw-w64-x86_64-tinyxml 2.6.2-5
mingw-w64-x86_64-tk 8.6.11.1-2
mingw-w64-x86_64-tools-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-tzdata 2021e-1
mingw-w64-x86_64-vulkan-headers 1.2.194-1
mingw-w64-x86_64-vulkan-loader 1.2.194-1
mingw-w64-x86_64-windows-default-manifest 6.4-3
mingw-w64-x86_64-wineditline 2.205-3
mingw-w64-x86_64-winpthreads-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-winstorecompat-git 9.0.0.6346.6cc97775a-1
mingw-w64-x86_64-x264 0.161.r3039.544c61f-2
mingw-w64-x86_64-x265 3.5-1
mingw-w64-x86_64-xvidcore 1.3.7-2
mingw-w64-x86_64-xxhash 0.8.0-1
mingw-w64-x86_64-xz 5.2.5-2
mingw-w64-x86_64-zlib 1.2.11-9
mingw-w64-x86_64-zstd 1.5.0-1
mingw-w64-x86_64-zziplib 0.13.72-3
mintty 1~3.5.1-1
mpdecimal 2.5.0-1
mpfr 4.1.0-1
msys2-keyring 1~20210904-1
msys2-launcher 1.3-2
msys2-runtime 3.2.0-15
nano 5.9-1
ncurses 6.2-1
nettle 3.7.3-1
openssh 8.8p1-1
openssl 1.1.1.l-1
p11-kit 0.24.0-1
pacman 6.0.1-3
pacman-contrib 1.4.0-2
pacman-mirrors 20210902-1
patch 2.7.6-1
patchutils 0.4.2-2
pcre 8.45-1
pcre2 10.37-1
perl 5.32.1-1
perl-Authen-SASL 2.16-2
perl-Clone 0.45-2
perl-Convert-BinHex 1.125-1
perl-Encode-Locale 1.05-1
perl-Error 0.17029-1
perl-File-Listing 6.14-1
perl-HTML-Parser 3.76-1
perl-HTML-Tagset 3.20-2
perl-HTTP-Cookies 6.10-1
perl-HTTP-Daemon 6.12-1
perl-HTTP-Date 6.05-1
perl-HTTP-Message 6.33-1
perl-HTTP-Negotiate 6.01-2
perl-IO-HTML 1.004-1
perl-IO-Socket-SSL 2.072-1
perl-IO-Stringy 2.113-1
perl-LWP-MediaTypes 6.04-1
perl-Locale-Gettext 1.07-7
perl-MIME-tools 5.509-1
perl-MailTools 2.21-1
perl-Module-Build 0.4231-1
perl-Net-HTTP 6.21-1
perl-Net-SMTP-SSL 1.04-1
perl-Net-SSLeay 1.90-1
perl-TermReadKey 2.38-2
perl-Test-Pod 1.52-1
perl-TimeDate 2.33-1
perl-Try-Tiny 0.30-1
perl-URI 5.09-1
perl-WWW-RobotRules 6.02-2
perl-XML-Parser 2.46-3
perl-YAML-Syck 1.34-1
perl-inc-latest 0.500-1
perl-libwww 6.57-1
pinentry 1.2.0-1
pkgconf 1.8.0-1
pkgfile 21-1
python 3.9.6-1
quilt 0.66-2
rebase 4.5.0-1
reflex 20210510-1
scons 3.1.2-6
sed 4.8-1
swig 4.0.2-1
tar 1.34-1
tcl 8.6.10-1
texinfo 6.8-1
texinfo-tex 6.8-1
tftp-hpa 5.2-3
time 1.9-1
ttyrec 1.0.8-2
tzcode 2021e-1
unrar 6.0.7-1
util-linux 2.35.2-1
vim 8.2.3441-1
wget 1.21.2-1
which 2.21-2
xmlto 0.0.28-2
xxhash 0.8.0-1
xz 5.2.5-1
zlib 1.2.11-1
zstd 1.5.0-1

@aarzilli
Copy link
Member

It's a duplicate of that issue. Unfortunately there is no fix for this without either downgrading msys or merging the delve specifc fix and recompiling delve with go 1.18 built from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants