summaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-09-28 21:55:21 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-09-28 21:55:21 +0000
commitc804ebc6d614890872b82978a0fef56dd8f77537 (patch)
tree0f7a7c0fd623babd70e332a27e9608eeb97eea00 /gdb/rs6000-nat.c
parent78bdd6a4c9dc0f87410d89504862768c3556db31 (diff)
downloadgdb-c804ebc6d614890872b82978a0fef56dd8f77537.tar.gz
import gdb-1999-09-28 snapshot
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index abd5362b764..6554f6963c9 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -755,28 +755,9 @@ xcoff_relocate_core (target)
add our sections to the section table for the core target. */
if (vp != vmap)
{
- int count;
struct section_table *stp;
- int update_coreops;
-
- /* We must update the to_sections field in the core_ops structure
- now to avoid dangling pointer dereferences. */
- update_coreops = core_ops.to_sections == target->to_sections;
-
- count = target->to_sections_end - target->to_sections;
- count += 2;
- target->to_sections = (struct section_table *)
- xrealloc (target->to_sections,
- sizeof (struct section_table) * count);
- target->to_sections_end = target->to_sections + count;
-
- /* Update the to_sections field in the core_ops structure
- if needed. */
- if (update_coreops)
- {
- core_ops.to_sections = target->to_sections;
- core_ops.to_sections_end = target->to_sections_end;
- }
+
+ target_resize_to_sections (target, 2);
stp = target->to_sections_end - 2;
stp->bfd = vp->bfd;