I was debugging a program. gdb suggested I install some separate debuginfo packages (I think this is a Fedora extension -- but it doesn't matter since the problem here is generic). I wanted one of these, so in a separate window I ran debuginfo-install. At this point I wanted to tell gdb to try again to load the separate debuginfo. However, there's no convenient way to do this. "sharedlibrary" doesn't work. "add-symbol-file" might work but it is a pain. I think the simplest would be to make "sharedlibrary" do it.
For completeness, "sharedlibrary" might not, but I guess "nosharedlibrary+sharedlibrary" would work.
(In reply to comment #1) > For completeness, "sharedlibrary" might not, but I guess > "nosharedlibrary+sharedlibrary" would work. Yeah, I thought of that (much) later. It seems obscure though.
I happened to try this today. The combo "nosharedlibrary" + "sharedlibrary .*" did work. However, it made gdb forget my selected frame. Perhaps a more targeted command could try harder to preserve the selected frame.