Commit Graph

17 Commits

Author SHA1 Message Date
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Peter Schauer 63f58cc529 Add auto-solib-add support for AIX, remove obsolete and unused
SOLIB_SYMBOLS_MANUAL code, cleanup of AIX shared library handling code.
	* rs6000-nat.c (vmap_symtab):  Do not try to modify offsets
	if symbols are not yet loaded.
	(vmap_add_symbols):  New function to add symbols for a vmap entry.
	(add_vmap):  Turn errors into warnings, return NULL vmap upon
	failure. Add symbols via vmap_add_symbols only if requested.
	(xcoff_relocate_core):  Allow debugging of core files without an
	executable file. Handle NULL returns from add_vmap gracefully.
	* xcoffsolib.c (solib_add):  Remove, no longer needed.
	(solib_info):  Do not check for new shared libraries if there is no
	inferior process.
	(sharedlibrary_command):  Made static.
	Do not check for new shared libraries if there is no inferior process.
	Add symbols for requested shared libraries via vmap_add_symbols.
	(_initialize_solib):  Add `set auto-solib-add' command.
	* xcoffsolib.h (vmap_add_symbols):  Add prototype declaration.

	* config/rs6000/tm-rs6000.h (PC_LOAD_SEGMENT):  Move from here ...
	* config/rs6000/nm-rs6000.h:  ... to here, this is an AIX native
	feature.
	* config/powerpc/tm-macos.h, config/powerpc/tm-ppc-eabi.h,
	config/powerpc/tm-ppc-nw.h, config/rs6000/tm-rs6000ly.h:
	Remove #undef PC_LOAD_SEGMENT.
	* config/powerpc/aix.mt, config/rs6000/aix4.mt, config/rs6000/rs6000.mt
	(TDEPFILES):  Move xcoffsolib.o from here ...
	* config/powerpc/aix.mh, config/rs6000/aix4.mh, config/rs6000/rs6000.mh
	(NATDEPFILES):  ... to here, xcoffsolib.o contains AIX native code
	only.
	* rs6000-tdep.c:  Remove #include xcoffsolib.h, no longer needed.
	* xcoffsolib.h (xcoff_relocate_symtab_hook):  Remove declaration.
	* rs6000-nat.c (_initialize_core_rs6000):  Remove setting of
	xcoff_relocate_symtab_hook, no longer needed.
	* xcoffsolib.c (solib_info, sharedlibrary_command):  Remove
	xcoff_relocate_symtab_hook indirection, call xcoff_relocate_symtab
	directly, as xcoffsolib.c is now compiled in native AIX configurations
	only.
	* Makefile.in:  Update dependencies for rs6000-tdep.o, rs6000-nat.o
	and xcoffsolib.o.
2000-11-09 09:49:00 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Peter Schauer 05d52ace86 * infrun.c (wait_for_inferior): Add the symbols for any
newly loaded objects upon a TARGET_WAITKIND_LOADED event.

	Rewrite code which determines the TOC address for calling functions
	in the inferior under AIX.
	* rs6000-nat.c (find_toc_address):  New function to determine
	the required TOC address from a function address.
	(_initialize_core_rs6000):  Set up find_toc_address_hook to point
	to find_toc_address.
	(xcoff_relocate_symtab, xcoff_relocate_core):  Remove
	add_text_to_loadinfo calls.
	(exec_one_dummy_insn):  Change pid and status to int to get rid of
	compiler warnings.
	(xcoff_relocate_symtab):  Cast ldi to `int *' when passing it to
	ptrace to get rid of compiler warnings.
	* rs6000-tdep.c:  Add definition for find_toc_address_hook.
	(rs6000_fix_call_dummy):  If find_toc_address_hook is non zero,
	patch TOC address load code in the call dummy with the value
	returned from find_toc_address_hook.
	(struct loadinfo, loadinfo, loadinfolen,
	loadinfotextindex, xcoff_init_loadinfo, free_loadinfo,
	xcoff_add_toc_to_loadinfo, add_text_to_loadinfo, find_toc_address):
	Remove.
	(_initialize_rs6000_tdep):  Remove initialization of
	coff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* xcoffread.c (coff_add_toc_to_loadinfo_hook,
	xcoff_init_loadinfo_hook):  Remove.
	(struct coff_symfile_info):  Add toc_offset field.
	(scan_xcoff_symtab):  Record toc_offset value in toc_offset field
	instead of calling xcoff_add_toc_to_loadinfo_hook.
	(get_toc_offset):  New function to return the value of the
	toc_offset field for an object file.
	(xcoff_initial_scan):  Remove call of xcoff_init_loadinfo_hook.
	* xcoffsolib.h (add_text_to_loadinfo):  Remove declaration.
	* config/rs6000/tm-rs6000.h:  Add declarations for
	find_toc_address_hook and get_toc_offset.
1997-08-15 21:10:32 +00:00
Peter Schauer 211b564e41 * config/powerpc/tm-ppc-aix4.h, config/rs6000/tm-rs6000-aix4.h
(DONT_RELOCATE_SYMFILE_OBJFILE):  Removed.
	* xcoffsolib.h (struct vmap):  Add new members tvma, toffs and dvma,
	remove tadj.
	* exec.c (bfdsec_to_vmap):  Initialize new vmap members, initialize
	tstart and dstart with section VMA.
	* rs6000-nat.c (vmap_symtab):  Relocate relative to the VMA in the
	object file.
	(vmap_ldinfo, xcoff_relocate_core):  Adjust tstart by section offset
	of the text section, remove DONT_RELOCATE_SYMFILE_OBJFILE hack.
	(vmap_exec):  Relocate relative to the VMA in the object file,
	relocate .bss section as well.
	(xcoff_relocate_core):  No longer adjust section addresses by VMA.
	* rs6000-tdep.c (find_toc_address):  Change type of tocbase
	to CORE_ADDR.
	* xcoffread.c (secnum_to_bfd_section):  New routine to get
	BFD section from CS section number.
	(scan_xcoff_symtab):  Make toc_offset section relative.

	* symtab.c (total_number_of_methods):  Avoid core dump if
	baseclass type is still undefined.
1997-04-19 08:52:17 +00:00
Fred Fish 062cb0d30d * Makefile.in (rs6000-nat.o): Dependant on xcoffsolib.h.
* config/rs6000/rs6000.mh (NATDEPFILES): Move xcoffread.o ...
	* config/rs6000/rs6000.mt (TDEPFILES): ... to here
	* xcoffsolib.c (xcoff_relocate_symtab_hook): Define and initialize.
	(solib_info): Call xcoff_relocate_symtab via the hook.
	(sharedlibrary_command): Ditto.
	* xcoffread.c: Remove all FAKING_RS6000 comments and defines.
	(xcoff_add_toc_to_loadinfo_hook): Define and initialize here.
	(xcoff_init_loadinfo_hook): Define and initialize here.
	(scan_xcoff_symtab): Call xcoff_add_toc_to_loadinfo via the hook.
	(xcoff_initial_scan): Call xcoff_init_loadinfo via the hook.
	* xcoffsolib.h (xcoff_relocate_symtab_hook): Declare extern func.
	* rs6000-tdep.c (_initialize_rs6000_tdep): Add initializations
	of xcoff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* rs6000-nat.c (_initialize_core_rs6000): Add initialization
	of xcoff_relocate_symtab_hook.
1996-05-02 01:32:41 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Stan Shebs 0c4b30ea74 Fri Apr 29 15:56:18 1994 Stan Shebs (shebs@andros.cygnus.com)
* xcoffexec.c: Reformat to standards and lint.
	(language.h): Include.
	(exec_close): Declare arg "quitting".
	(file_command): Declare arg "from_tty".
	(map_vmap): Cast xmalloc result to PTR.
	* rs6000-nat.c: Reformat to standards and lint.
	(exec_one_dummy_insn): Use char array for saved instruction.
	(fixup_breakpoints): Declare.
	(vmap_ldinfo): Be more informative in fatal error messages.
	(xcoff_relocate_symtab): Define to return void.
	* xcoffsolib.h: Reformat to standards, improve comments.
	* config/rs6000/nm-rs6000.h (xcoff_relocate_symtab): Declare.
1994-04-30 00:04:43 +00:00
Jim Kingdon 95171817ba * xcoffsolib.h, xcoffexec.c: Undo the part of Fred's bfd->abfd
change which involved structure elements.  It was unnecessary and
	was not consistently done.
1993-10-12 20:36:37 +00:00
Fred Fish a71c0593c6 * osfsolib.c, remote-sim.c, remote.c, solib.c, xcoffexec.c,
xcoffsolib.h:  Use 'abfd' for bfd variables instead of 'bfd'.
	Sun cc doesn't like variable names that match their typedef'd type.
1993-10-08 23:04:45 +00:00
Jim Kingdon 3c02636b4e * Clean up xcoff relocation.
objfiles.h (struct objfiles): Add section_offsets, num_sections.
	symfile.c (syms_from_objfile), xcoffread.c (xcoff_symfile_offsets):
	Set them.
	symtab.h (struct general_symbol_info): Add section field.
	minsyms.c (prim_record_minimal_symbol{,_and_info}): Set it.
	xcoffread.c: Set section for symbols and msymbols.
	(struct symtab): Add block_line_section field.
	buildsym.c (end_symtab): Set it.
	(end_symtab and callers): Add section parameter.
	objfiles.c (objfile_relocate): New funciton.
	xcoffexec.c (vmap_symtab): Use it.
	xcoffsolib.h (struct vmap): Remove unused fields.
	config/rs6000/tm-rs6000.h, stack.c, xcoffexec.c: Remove
	CORE_NEEDS_RELOCATION, symtab_relocated.
	config/rs6000/tm-rs6000.h: Remove use of loadinfotext.
	rs6000-tdep.c: Make loadinfotext static.
	breakpoint.c (fixup_breakpoints): Doc fix.
	symtab.h (struct symtab), config/rs6000/tm-rs6000.h, buildsym.c
	(end_symtab): primary field replaces nonreloc.
1993-03-26 14:59:43 +00:00
Jim Kingdon 2aefe6e4ae Fri Mar 12 09:33:23 1993 Jim Kingdon (kingdon@cygnus.com)
* xcoffread.c (retrieve_tracebackinfo): Move assignment out
	of while condition.

	* xcoffread.c (enter_line_range): complain() on bad endoffset.
	xcoffread.c: Doc fixes.

Tue Mar  9 09:56:12 1993  Jim Kingdon  (kingdon@cygnus.com)

	* tm-rs6000.h (CORE_NEEDS_RELOCATION): Just call xcoff_relocate_core.
	xcoffexec.c (xcoff_relocate_core): New function.
	(text_adjustment): Removed.
	(add_vmap): Return the vmap.
	rs6000-tdep.c (add_text_to_loadinfo): No longer static.

Fri Mar  5 05:22:46 1993  Jim Kingdon  (kingdon@cygnus.com)

	* xcoffsolib.h: Add objfile member to struct vmap.
	xcoff{exec,solib}.c: Use it, not lookup_objfile_bfd.
	xcoffexec.c (add_vmap): Allocate objfiles here.
1993-03-12 23:12:59 +00:00
John Gilmore 5140562f37 * tm-hppa.h: New file, architectural definition of HP PA.
* tm-hppabsd.h, tm-hppahpux.h:  Shrink to deltas from tm-hppa.h.

* am29k-pinsn.c, am29k-tdep.c, copying.awk, copying.c,
hppa-coredep.c, hppa-pinsn.c, hppabsd-core.c, hppabsd-tdep.c,
hppabsd-xdep.c, hppahpux-tdep.c, hppahpux-xdep.c, remote-udi.c,
ser-go32.c, xcoffsolib.c:  Remove <stdio.h> which is already in
"defs.h".

* hppa-coredep.c, hppa-pinsn.c, hppabsd-core.c, hppabsd-tdep.c,
hppabsd-xdep.c, hppahpux-tdep.c, hppahpux-xdep.c, xcoffsolib.c,
xcoffsolib.h, xm-go32.h, xm-hppabsd.h, xm-hppahpux.h:  Copyrights.
1992-06-25 11:15:47 +00:00
Per Bothner 1eeba68641 Merged in latest RS6000 diffs from Metin G. Ozisik. 1992-03-29 22:33:35 +00:00