Debug inline function from include file

Sysprogs forums Forums VisualGDB Debug inline function from include file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #680
    Denis
    Participant

    Hi,

    I have VisualGDB project for linux application and have include file with inline functions.
    While i debug inline function in include file step by step – VisualStudio opens include file for debug from VisualGdb cache (in read only mode) instead of include file from my project location (in read-writte mode).
    This is very uncomfortable…
    Is it possible to change this behavior?

    Thanks.

    #2771
    ket
    Participant

    Hi,

    We have tried to replicate your scenario with no success.

    Is the include file with inline functions part of your project? Do you have several include files with the same name in the project directory on you Linux machine?

    #2772
    Denis
    Participant

    Ok…
    my project scenario:

    directory structure located on Windows PC:

    
    my_project                                             <- !!! - this dir is windows share for linux
    |-  lin-driver-prj
    |     -  driver files
    |
    |-  test-apps
    |       |-  test-app-1
    |       |     |- main.cpp
    |       |     |- header.h                         <- !!! - inline functions debug normal (all OK)
    |       |     |- test-app-1.vcxproj
    |       |     - test-app-1.Debug.vgdbsettings
    |       |
    |       |-  test-app-2
    |               - files...
    |
    - common-hdr-1.h                          <- !!! - inline functions debug from common-hdr-1.h FROM VisualGDB CACHE
    

    Project located on windows PC. my_project directory - is windows share for linux.
    VisualGDB project settings:
    - File sync - use share to sync
    - Share forlder mode - manually
    - Local directory - $(ProjectDir)
    - Remote directory - "rootprj_from_win" <- this is linux mount point for windows share "my_project". Files "common-hdr-1.h" and "header.h" are part of project "test-app-1".
    include file path settings - set to "." and "....".
    inline functions from "header.h" debug normal.
    inline functions from "common-hdr-1.h" debug from VisualGDB cache.
    If i move "header.h" to the same location as "common-hdr-1.h", then "header.h" will debug from VisualGDB cache too.

    Hope this help to reproduce this behavior.

    Summary IMHO:
    if i use
    #include
    #include
    #include "header.h"
    #include "common-hdr.h"

    "sys/ioctl.h" and "errno.h" - are linux system include files. They are not part of the project. They are external project dependencies. And they must opens from CACHE.
    "header.h" - is part of the project (included in project as file), located in the project directory. And it must opens from it's location (not from cache).
    "common-hdr.h" - is part of the project (included in project as file), not located the project directory. And it must opens from it's location too (not from cache).

    Thanks.

    #2773
    support
    Keymaster

    Hi,

    This is the limitation of the manual shared folder mode. You can overcome it by switching to the “shared windows folder mode”.
    Simply select “Use a shared Windows folder” in the Project Properties, click “Provide information required to mount the local folder” and select your shared Windows folder and the Linux mount point.
    This will provide enough information for VisualGDB to know which directories are part of the shared folder and which are not and thus need to be downloaded.

    E.g. if you mapped e:projects to /mnt/projects, VisualGDB will open files in /mnt/projects/my_project as well as in /mnt/projects/some_other_project directly, as it will know that all files under /mnt/projects are a part of the Windows share.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.