问题描述
我创建了使用Visual Studio C ++ 2015在Windows环境中使用c ++应用程序。我已将其移植到带有armv7和debian jessie
服务器的cubietruck板上。我尝试使用Windows的Visual Studio c ++ 2015实现远程开发。使用以下Makefile成功构建:
  CC:= g ++
  #文件夹
  SRCDIR:= src
  BUILDDIR:= build
  TARGETDIR:= bin
  #targets
  EXECUTABLE:= app
  TARGET:= $(TARGETDIR)/ $(EXECUTABLE)
  SRCEXT:= cpp
 来源:= $(shell find $(SRCDIR)-type f -name *。$(SRCEXT))
 对象:= $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:。$(SRCEXT)=。o))
  CFLAGS:= -g -c -Wall -std = c ++ 14 -ggdb
  INC:= - 我包括
  LIB:= -L / usr / local / lib -lPocoCryptod -lPocoFoundationd
  $(TARGET):$(OBJECTS)
@echo"链接..." b
@echo" $(CC)$ ^ -o $(TARGET)$(LIB)" ;; $(CC)$ ^ -o $(TARGET)$(LIB)
$
  $(BUILDDIR)/%。o:$(SRCDIR)/%.$(SRCEXT)
@mkdir -p $( BUILDDIR)
@echo" $(CC)$(CFLAGS)$(INC)-c -o $ @ $<" ;; $(CC)$(CFLAGS)$(INC)-c -o $ @ $<
&NBSP;干净:
@echo"清洁......" ;;
@echo" $(RM)-r $(BUILDDIR)$(TARGET)" ;; $(RM)-r $(BUILDDIR)$(TARGET)
$
&NBSP; .PHONY:clean
此外,该应用程序在目标板上正常运行。但是,当我尝试使用gdb模式进行远程调试时,我在Visual Studio窗口中获取了非法指令,以及linux控制台中的以下内容:
终止子项信号= 0x4(SIGILL)
GDBserver退出
版本gdb是7.7.1,visual studio linux插件是1.0.7我也试过gdbserver模式但也不成功。我还尝试使用标志-ggdb构建,但不幸的是,Visual Studio 2017的更新不是一个选项。是否有办法绕过这个问题
?
I have created a c++ app in windows environment with Visual Studio C++ 2015. I have ported it to a cubietruck board with armv7 and debian jessie server. I tried to achieve remote development with Visual Studio c++ 2015 from windows. The building is successful using the following Makefile:
CC := g++
# Folders
SRCDIR := src
BUILDDIR := build
TARGETDIR := bin
# Targets
EXECUTABLE := app
TARGET := $(TARGETDIR)/$(EXECUTABLE)
SRCEXT := cpp
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
CFLAGS := -g -c -Wall -std=c++14 -ggdb
INC := -I include
LIB := -L /usr/local/lib -lPocoCryptod -lPocoFoundationd
$(TARGET): $(OBJECTS)
@echo " Linking..."
@echo " $(CC) $^ -o $(TARGET) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIB)
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@mkdir -p $(BUILDDIR)
@echo " $(CC) $(CFLAGS) $(INC) -c -o $@ $<"; $(CC) $(CFLAGS) $(INC) -c -o $@ $<
clean:
@echo " Cleaning...";
@echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET)
.PHONY: clean
Also the app is running correctly on the target board. However when I try to remote debug with gdb mode I get the a break of illegal instruction on Visual Studio windows and the following in linux console :
Child terminated with signal = 0x4 (SIGILL)
GDBserver exiting
The version of gdb is 7.7.1 and the visual studio linux plugin is 1.0.7 I also tried with the gdbserver mode but also unsuccessful. I also tried to build with the flag -ggdb but Unfortunately the update into Visual Studio 2017 is not an option. Is there a way to circumvent this issue?
这篇关于使用Visual Studio 2015进行远程调试时,子项以signal = 0x4(SIGILL)结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!