Adapt GDB commands to ldso changes

Issue #1042.