断点没有被击中 - CLION完整远程调试-MakeFile -GDB

发布于 2025-02-06 08:23:20 字数 3993 浏览 3 评论 0 原文

我尝试了哪种类型的 远程调试连接。完整的远程主机,远程调试,远程GDB服务器等。

实际上,当我单击 debug 按钮。我可以从我的CLION运行它,但它永远不会碰到我的断点。.

我在远程调试上不专业,实际上是我的第二件工作在我的覆盆子Pi Lorawan设备( Debian )上。 连接到我的家庭网络的设备,其中有一个软件包experter应用程序。应用聆听1680端口。

通常,它在远程设备上工作,没有任何问题。我将 App 下载到我的计算机上,并在Clion中成功构建了该项目。在尝试了很多事情之后,几乎所有远程调试和设置的组合。我知道我错过了一些观点,我需要帮助。如果您可以帮助我,您将挽救我的生命

makefile:

    ### get external defined data

    include ../target.cfg

    ### Application-specific constants

    APP_NAME := lora_pkt_fwd

    ### Environment constants

    LGW_PATH ?= ../libloragw
    LIB_PATH ?= ../libtools
    ARCH ?=
    CROSS_COMPILE ?=

    OBJDIR = obj
    INCLUDES = $(wildcard inc/*.h)

    ### External constant definitions
    # must get library build option to know if mpsse must be linked or not

    include $(LGW_PATH)/library.cfg
    RELEASE_VERSION := `cat ../VERSION`

    ### Constant symbols

    CC := -g $(CROSS_COMPILE)gcc
    AR := $(CROSS_COMPILE)ar

    CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libtools/inc
    VFLAG := -D VERSION_STRING="\"$(RELEASE_VERSION)\""

    ### Constants for Lora concentrator HAL library
    # List the library sub-modules that are used by the application

    LGW_INC =
    ifneq ($(wildcard $(LGW_PATH)/inc/config.h),)
      # only for HAL version 1.3 and beyond
      LGW_INC += $(LGW_PATH)/inc/config.h
    endif
    LGW_INC += $(LGW_PATH)/inc/loragw_hal.h

    ### Linking options

    LIBS := -lloragw -ltinymt32 -lparson -lbase64 -lrt -lpthread -lm -lcursor

    ### General build targets

    all: $(APP_NAME)

    clean:
        rm -f $(OBJDIR)/*.o
        rm -f $(APP_NAME)

    ifneq ($(strip $(TARGET_IP)),)
     ifneq ($(strip $(TARGET_DIR)),)
      ifneq ($(strip $(TARGET_USR)),)
    install:
        @echo "---- Copying packet_forwarder files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp lora_pkt_fwd $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
    install_conf:
        @echo "---- Copying packet_forwarder conf files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp global_conf.json.sx1250.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
        @scp global_conf.json.sx1257.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
      else
        @echo "ERROR: TARGET_USR is not configured in target.cfg"
      endif
     else
        @echo "ERROR: TARGET_DIR is not configured in target.cfg"
     endif
    else
        @echo "ERROR: TARGET_IP is not configured in target.cfg"
    endif

    ### Sub-modules compilation

    $(OBJDIR):
        mkdir -p $(OBJDIR)

    $(OBJDIR)/%.o: src/%.c $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc $< -o $@

    ### Main program compilation and assembly

    $(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o $@

    $(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a $(OBJDIR)/jitqueue.o
        $(CC) -L$(LGW_PATH) -L$(LIB_PATH) $< $(OBJDIR)/jitqueue.o -o $@ $(LIBS)

    ### EOF

我正在与您分享我的最后一个尝试屏幕截图:完整的Remot Host

“”

​。

​/I.sstatic.net/lghps.png“ alt =”“>

“断点错误”

It doesn't matter what type of remote debug connection I tried.. Full Remote Host, Remote Debug, Remote GDB Server etc.

Actually remote device starts working when I clicked the debug button. I can run it from my CLion but it never hits to my breakpoints..

I'm not professional on remote debugging, actually it is my second work but this time it is on already working ( readymade ) project on my Raspberry pi Lorawan device ( Debian ) .
Device connected to my home network and there is a package forwarder app in it. App listens 1680 port.

Normally it is working on remote device with no problem. I downloaded the app to my computer and built the project successfully in CLion. After I tried lots of things, almost every combination of remote debugging and settings. I understood I'm missing some point and I need help. If you can help me you will save my life

Makefile :

    ### get external defined data

    include ../target.cfg

    ### Application-specific constants

    APP_NAME := lora_pkt_fwd

    ### Environment constants

    LGW_PATH ?= ../libloragw
    LIB_PATH ?= ../libtools
    ARCH ?=
    CROSS_COMPILE ?=

    OBJDIR = obj
    INCLUDES = $(wildcard inc/*.h)

    ### External constant definitions
    # must get library build option to know if mpsse must be linked or not

    include $(LGW_PATH)/library.cfg
    RELEASE_VERSION := `cat ../VERSION`

    ### Constant symbols

    CC := -g $(CROSS_COMPILE)gcc
    AR := $(CROSS_COMPILE)ar

    CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libtools/inc
    VFLAG := -D VERSION_STRING="\"$(RELEASE_VERSION)\""

    ### Constants for Lora concentrator HAL library
    # List the library sub-modules that are used by the application

    LGW_INC =
    ifneq ($(wildcard $(LGW_PATH)/inc/config.h),)
      # only for HAL version 1.3 and beyond
      LGW_INC += $(LGW_PATH)/inc/config.h
    endif
    LGW_INC += $(LGW_PATH)/inc/loragw_hal.h

    ### Linking options

    LIBS := -lloragw -ltinymt32 -lparson -lbase64 -lrt -lpthread -lm -lcursor

    ### General build targets

    all: $(APP_NAME)

    clean:
        rm -f $(OBJDIR)/*.o
        rm -f $(APP_NAME)

    ifneq ($(strip $(TARGET_IP)),)
     ifneq ($(strip $(TARGET_DIR)),)
      ifneq ($(strip $(TARGET_USR)),)
    install:
        @echo "---- Copying packet_forwarder files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp lora_pkt_fwd $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
    install_conf:
        @echo "---- Copying packet_forwarder conf files to $(TARGET_IP):$(TARGET_DIR)"
        @ssh $(TARGET_USR)@$(TARGET_IP) "mkdir -p $(TARGET_DIR)"
        @scp global_conf.json.sx1250.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
        @scp global_conf.json.sx1257.* $(TARGET_USR)@$(TARGET_IP):$(TARGET_DIR)
      else
        @echo "ERROR: TARGET_USR is not configured in target.cfg"
      endif
     else
        @echo "ERROR: TARGET_DIR is not configured in target.cfg"
     endif
    else
        @echo "ERROR: TARGET_IP is not configured in target.cfg"
    endif

    ### Sub-modules compilation

    $(OBJDIR):
        mkdir -p $(OBJDIR)

    $(OBJDIR)/%.o: src/%.c $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc 
lt; -o $@

    ### Main program compilation and assembly

    $(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) $(INCLUDES) | $(OBJDIR)
        $(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc 
lt; -o $@

    $(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a $(OBJDIR)/jitqueue.o
        $(CC) -L$(LGW_PATH) -L$(LIB_PATH) 
lt; $(OBJDIR)/jitqueue.o -o $@ $(LIBS)

    ### EOF

I'm sharing my last try screenshots with you : Full Remot Host.

Breakpoint Error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文