microsoft / VSLinux

VS extension for C++ Linux development
205 stars 34 forks source link

VS2017 GDB exception 'Illegal Instruction' debugging Raspberry Pi build compiled with g++ 4.7 and above #373

Closed ComputeUnit closed 4 years ago

ComputeUnit commented 5 years ago

Hello,

I have successfully compiled and debugged a few Raspberry Pi2 test 'C++' projects using VS2017 15.9.5 using the Remote_GCC_1_0 toolset. It all seemed to go rather smoothly once I figured out the whole '~/projects/...' doesn't work and needs to be '/home/pi/projects/...'

The Raspberry Pi2 only had GCC 4.6.3 installed and therefore no C++11 support. So, I updated the Raspberry Pi2 to GCC 4.7.2 and got a C++11 test project to compile just fine. Unfortunately, on launching a debugger session using F5, the debugger raises an Exception 'Illegal instruction' (Screenshot Attached).

I have also tried updated to GCC 4.8 but it is the same. So before I go ahead an try multiple updated versions of GCC, is there anything I should also be doing on the VS2017 side of things?

Any help, much appreciated.

Vs2017-RPi-Gcc47-Exception

paulmaybee commented 5 years ago

Are you using the debugger in "gdb" or "gdbserver" mode (Project properties->Debugging->Debugging Mode)? If gdbserver mode then retry in gdb mode (requires SSH server and gdb to be installed on the Pi). Otherwise can you supply a gdb trace of your failure scenario? To get a trace: Open your project in VS. Enter "debug.midebuglog /On:some-file-name" in the VS Command Window, run your scenario, close VS.

itodirel commented 4 years ago

We are able to debug successfully on the Pi, if this is still an issue for you, please provide repro steps or a Dockerfile, and open a feedback ticket on the Developer Community.

We have retired this issue list, here on Github. We now adopted and are using the Developer Community (https://developercommunity.visualstudio.com/spaces/62/index.html), for Cross Plat and Linux experiences (and C++ generally), which we are actively monitoring. Please use the Developer Community, to report issues or suggestions for bugs or new experiences. Further discussions on this thread here on Github might be unmonitored. If there is further comments or context to this current issue, please create a new issue on the Developer Community, and provide the context there. For any existing issues, which we can or able to reproduce, or for anything that is actionable to us and understood, we will provide an update right here in this thread. Additionally, for new suggestions or new issues, which at this time are in our roadmap, or for which we believe and have evidence that broadly and/or significantly benefit everyone, we will open a suggestion ticket, and link it here. For anything else, we recommend to please open a ticket on the Developer Community. That isn't because we will not look at the problem, or not investigate it otherwise, but simply because we need additional information. And for features, we are tracking them on the Developer Community.