Sysprogs forums › Forums › VisualGDB › Refreshing the stack after loading libraries?
- This topic has 6 replies, 2 voices, and was last updated 7 years, 4 months ago by
support.
-
AuthorPosts
-
April 4, 2017 at 20:32 #10865
BitFlipper
ParticipantHi,
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.
April 5, 2017 at 04:56 #10867support
KeymasterHi,
Thanks, we can address it in v5.3. Can you confirm that the “bt” command issued manually displays the correct (new) stack?
April 5, 2017 at 22:27 #10879BitFlipper
ParticipantHi,
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>”).
April 6, 2017 at 01:02 #10880BitFlipper
ParticipantJust 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.
April 7, 2017 at 05:52 #10900support
KeymasterOK, 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.
April 7, 2017 at 19:11 #10910BitFlipper
ParticipantExcellent, thanks!
October 1, 2017 at 01:37 #12549support
KeymasterOK, 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.
-
AuthorPosts
- You must be logged in to reply to this topic.