aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-09-24 09:00:50 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-09-24 09:00:50 +0000
commit9137a6f46143a8040946749c16e7f5484c253b2e (patch)
tree436a409819d5ae5833d3123b62064b9fd6d69b64 /gdb/rs6000-nat.c
parentcacd15c40dde7322fcfbd64edf524e8ce9af2225 (diff)
downloadgdb-9137a6f46143a8040946749c16e7f5484c253b2e.zip
gdb-9137a6f46143a8040946749c16e7f5484c253b2e.tar.gz
gdb-9137a6f46143a8040946749c16e7f5484c253b2e.tar.bz2
* corelow.c (add_solib_stub): Remove copying of to_sections,
pass current_target to SOLIB_ADD. The Sep 10 change failed if SOLIB_ADD errored out, or if SOLIB_ADD was trying to access target memory. * corelow.c (core_open): After reading the shared libraries, copy the modified to_sections vector from current_target to core_ops, so that core_close can free it later. * config/rs6000/nm-rs6000.h, rs6000-nat.c (xcoff_relocate_core): Pass down target parameter from SOLIB_ADD and use it instead of directly accessing core_ops.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index a5615fe..8b92b6f 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -638,7 +638,8 @@ xcoff_relocate_symtab (pid)
from the core file. */
void
-xcoff_relocate_core ()
+xcoff_relocate_core (target)
+ struct target_ops *target;
{
/* Offset of member MEMBER in a struct of type TYPE. */
#ifndef offsetof
@@ -731,13 +732,13 @@ xcoff_relocate_core ()
int count;
struct section_table *stp;
- count = core_ops.to_sections_end - core_ops.to_sections;
+ count = target->to_sections_end - target->to_sections;
count += 2;
- core_ops.to_sections = (struct section_table *)
- xrealloc (core_ops.to_sections,
+ target->to_sections = (struct section_table *)
+ xrealloc (target->to_sections,
sizeof (struct section_table) * count);
- core_ops.to_sections_end = core_ops.to_sections + count;
- stp = core_ops.to_sections_end - 2;
+ target->to_sections_end = target->to_sections + count;
+ stp = target->to_sections_end - 2;
/* "Why do we add bfd_section_vma?", I hear you cry.
Well, the start of the section in the file is actually