Refreshing the stack after loading libraries?

Sysprogs forums Forums VisualGDB Refreshing the stack after loading libraries?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10865
    BitFlipper
    Participant

    Hi,

    I have a project that uses a very large number of libraries, so I disable auto loading of libraries and just load the ones I need. However, sometimes the program crashes in the debugger, but doesn’t yet have the required libraries loaded and hence the stack isn’t very useful. I can then manually load the required libraries with ‘sharedlibrary’. But in this case, the old stack is still shown and it doesn’t refresh to display the newly loaded symbols. If I close/re-open the stack window, it still shows the old stack. So how can I refresh the stack?

    Note, I know that if I’m able to single step, the stack will then be displayed with the symbols that were manually loaded. However in the case of some crashes, it isn’t possible to single-step, and hence I can’t use this trick to refresh the stack.

    I also know that I can manually load the required libraries ahead of time, however these crashes are sometimes very unpredictable, intermittent and difficult to reproduce, so it would really help if I can load the libraries after the crash and then refresh the stack so that it picks up the newly loaded symbols.

    #10867
    support
    Keymaster

    Hi,

    Thanks, we can address it in v5.3. Can you confirm that the “bt” command issued manually displays the correct (new) stack?

    #10879
    BitFlipper
    Participant

    Hi,

    Yes I have confirmed that bt will show the updated stack after manually loading libraries with sharedlibrary.

    Also, if I open the Parallel Stacks view after manually loading the libraries, it too shows the updated stacks. However, when I double-click in a frame in the Parallel Stacks view to go to that frame, the Call Stack view goes to that frame but because the Call Stack view is still using the old symbols, it doesn’t find the source code even though the Parallel Stacks view’s stacks do show the correct function names.

    So either the Call Stack view (and related internal structures) need to be refreshed when VGDB detects that GDB loaded new symbols, or there needs to be a command/button somewhere that can be manually activated so that VGDB can refresh the Call Stack view. Not sure if VGDB actively tracks the output of GDB and hence can be trained to pick up on new symbols being loaded (e.g., when GDB outputs “Loaded symbols for <filename>”).

    #10880
    BitFlipper
    Participant

    Just to add… If the Parallel Stacks view was open at the time when the libraries were loaded, it too will continue to show the old symbols, even if it is closed/re-opened.

    #10900
    support
    Keymaster

    OK, thanks. We should be able to reproduce and fix it in v5.3. We will post an update here once we have a preview build with this feature.

    #10910
    BitFlipper
    Participant

    Excellent, thanks!

    #12549
    support
    Keymaster

    OK, we have added this to the final VisualGDB 5.3 release.

    If a manually executed command shows “Loaded symbols for” as a part of its output, VisualGDB will automatically re-query the call stack and update the relevant Visual Studio windows.

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