mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Tue Apr 25 13:51:58 2000 glen mccready <gkm@pobox.com>
* rs6000-nat.c (xcoff_relocate_symtam): Recover from the wrong patch being applied `Fri Apr 7 13:44:38 2000'.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Apr 25 13:51:58 2000 glen mccready <gkm@pobox.com>
|
||||||
|
|
||||||
|
* rs6000-nat.c (xcoff_relocate_symtam): Recover from the wrong
|
||||||
|
patch being applied `Fri Apr 7 13:44:38 2000'.
|
||||||
|
|
||||||
2000-04-24 Kevin Buettner <kevinb@redhat.com>
|
2000-04-24 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
* ia64-linux-tdep.c: New file.
|
* ia64-linux-tdep.c: New file.
|
||||||
|
@ -640,39 +640,38 @@ xcoff_relocate_symtab (pid)
|
|||||||
unsigned int pid;
|
unsigned int pid;
|
||||||
{
|
{
|
||||||
int load_segs = 64; /* number of load segments */
|
int load_segs = 64; /* number of load segments */
|
||||||
|
int rc;
|
||||||
|
struct ld_info *ldi = NULL;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
struct ld_info *ldi;
|
ldi = (void *) xrealloc (ldi, load_segs * sizeof (*ldi));
|
||||||
int rc;
|
|
||||||
|
|
||||||
ldi = (void *) alloca (load_segs * sizeof (*ldi));
|
/* According to my humble theory, AIX has some timing problems and
|
||||||
if (ldi == 0)
|
when the user stack grows, kernel doesn't update stack info in time
|
||||||
perror_with_name ("xcoff_relocate_symtab");
|
and ptrace calls step on user stack. That is why we sleep here a
|
||||||
|
little, and give kernel to update its internals. */
|
||||||
|
|
||||||
/* According to my humble theory, AIX has some timing problems and
|
usleep (36000);
|
||||||
when the user stack grows, kernel doesn't update stack info in time
|
|
||||||
and ptrace calls step on user stack. That is why we sleep here a little,
|
|
||||||
and give kernel to update its internals. */
|
|
||||||
|
|
||||||
usleep (36000);
|
errno = 0;
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
rc = ptrace (PT_LDINFO, pid, (PTRACE_ARG3_TYPE) ldi,
|
rc = ptrace (PT_LDINFO, pid, (PTRACE_ARG3_TYPE) ldi,
|
||||||
load_segs * sizeof (*ldi), (int *) ldi);
|
load_segs * sizeof (*ldi), (int *) ldi);
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
{
|
{
|
||||||
if (errno == ENOMEM)
|
if (errno == ENOMEM)
|
||||||
load_segs *= 2;
|
load_segs *= 2;
|
||||||
else
|
else
|
||||||
perror_with_name ("ptrace ldinfo");
|
perror_with_name ("ptrace ldinfo");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmap_ldinfo (ldi);
|
vmap_ldinfo (ldi);
|
||||||
vmap_exec (); /* relocate the exec and core sections as well. */
|
vmap_exec (); /* relocate the exec and core sections as well. */
|
||||||
}
|
}
|
||||||
} while (rc == -1);
|
} while (rc == -1);
|
||||||
|
if (ldi)
|
||||||
|
free (ldi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Core file stuff. */
|
/* Core file stuff. */
|
||||||
|
Reference in New Issue
Block a user