void do_update_shlib_info(Inferior inferior)
{
bool first = true;
TargetAddress map = first_link_map;
while (!map.IsNull) {
int the_size = 4 * inferior.TargetAddressSize;
TargetReader map_reader = new TargetReader (inferior.ReadMemory (map, the_size));
TargetAddress l_addr = map_reader.ReadAddress ();
TargetAddress l_name = map_reader.ReadAddress ();
map_reader.ReadAddress ();
string name;
try {
name = inferior.ReadString (l_name);
// glibc 2.3.x uses the empty string for the virtual
// "linux-gate.so.1".
if ((name != null) && (name == ""))
name = null;
} catch {
name = null;
}
map = map_reader.ReadAddress ();
if (first) {
first = false;
continue;
}
if (name == null)
continue;
if (bfd_hash.Contains (name))
continue;
bool step_into = Process.ProcessStart.LoadNativeSymbolTable;
AddExecutableFile (inferior, name, l_addr, step_into, true);
}
}