[PATCH 2/3] dbghelp: Factor out query_dsym.