How do I set LD_LIBRARY_PATH for the debugged application?

Sysprogs forums Forums VisualGDB How do I set LD_LIBRARY_PATH for the debugged application?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #451
    BitFlipper
    Participant

    Sorry, I’m asking a lot of questions here…

    The application being debugged needs to have LD_LIBRARY_PATH set to a specific value. I don’t want to set the global environment variable, just the application being debugged. Previously when I did not debug the application – just ran it, I ran a bash script that called “export” with the value for LD_LIBRARY_PATH. However, now that I’m debugging it, I’m not sure how to specify it.

    I tried to run the command “export” as a separate step before debugging, however it seems it doesn’t work because it is run as a separate process and hence the debugged application doesn’t see it. How do I set the environment variables for the debugged application?

    Thanks in advance for any help

    #2120
    BitFlipper
    Participant

    OK figured it out. I needed to add it to the environment variables listed under the GDB Customize settings.

    #2121
    blitz
    Participant

    Hi,

    Where exactly did you do this in VisualGDB? User-Variables?

    Simply putting in LD_LIBRARY_PATH and the path (ie /usr/lib)?

    Thanks Blitz

    #2122
    support
    Keymaster

    Hi,

    Please open VisualGDB Project Properties window, go to the Debug Settings page, select “use custom GDB executable”, click “Customize” and update the “Additional Environment Variables” line.

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