version 1.8, 2002/06/11 06:34:38 |
version 1.9, 2002/07/22 01:20:50 |
|
|
void |
void |
aout_update(struct pstate *ps) |
aout_update(struct pstate *ps) |
{ |
{ |
pid_t pid = ps->ps_pid; |
|
struct _dynamic dyn; |
struct _dynamic dyn; |
struct so_debug sdeb; |
struct so_debug sdeb; |
struct section_dispatch_table sdt; |
struct section_dispatch_table sdt; |
|
|
} |
} |
addr = s->n_value + ps->ps_sym_exe->st_offs; |
addr = s->n_value + ps->ps_sym_exe->st_offs; |
|
|
if (read_from_pid(pid, addr, &dyn, sizeof(dyn)) < 0) { |
if (process_read(ps, addr, &dyn, sizeof(dyn)) < 0) { |
warn("Can't read __DYNAMIC"); |
warn("Can't read __DYNAMIC"); |
return; |
return; |
} |
} |
|
|
return; |
return; |
} |
} |
|
|
if (read_from_pid(pid, (off_t)(reg)dyn.d_debug, &sdeb, sizeof(sdeb)) < 0) { |
if (process_read(ps, (off_t)(reg)dyn.d_debug, &sdeb, sizeof(sdeb)) < 0) { |
warn("Can't read __DYNAMIC.d_debug"); |
warn("Can't read __DYNAMIC.d_debug"); |
return; |
return; |
} |
} |
|
|
return; |
return; |
} |
} |
|
|
if (read_from_pid(pid, (off_t)(reg)dyn.d_un.d_sdt, &sdt, sizeof(sdt)) < 0) { |
if (process_read(ps, (off_t)(reg)dyn.d_un.d_sdt, &sdt, sizeof(sdt)) < 0) { |
warn("Can't read section dispatch table"); |
warn("Can't read section dispatch table"); |
return; |
return; |
} |
} |
|
|
char fname[MAXPATHLEN]; |
char fname[MAXPATHLEN]; |
int i; |
int i; |
|
|
if (read_from_pid(pid, somp, &som, sizeof(som)) < 0) { |
if (process_read(ps, somp, &som, sizeof(som)) < 0) { |
warn("Can't read so_map"); |
warn("Can't read so_map"); |
break; |
break; |
} |
} |
somp = (off_t)(reg)som.som_next; |
somp = (off_t)(reg)som.som_next; |
if (read_from_pid(pid, (off_t)(reg)som.som_path, fname, |
if (process_read(ps, (off_t)(reg)som.som_path, fname, |
sizeof(fname)) < 0) { |
sizeof(fname)) < 0) { |
warn("Can't read so filename"); |
warn("Can't read so filename"); |
continue; |
continue; |