Commit Graph

5 Commits

Author SHA1 Message Date
John Gilmore
bdbd5f5086 Make writing to files work properly. (Fixes to BFD are also needed.)
* core.c (core_open):  Open file ourselves, read or r/w, depending on
write_files.  Use bfd_fdopenr.
* gdbcore.h (write_files):  New variable.
* exec.c (write_files):  Define variable, add set&show for it.
(exec_file_command):  Use write_files to open for read or r/write.

Make shared library reading happen automatically.  These changes
are mostly from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.

* inferior.h (stop_soon_quietly):  Add to exported variables.
* infrun.c (child_create_inferior):  call solib hook, if defined.
(child_attach):  call solib hook, if defined.
* solib.c:  Include inferior.h.  Add from_tty to so_list as kludge.
(find_solib):  Use lookup_misc_func rather than hand-rolled.
(symbol_add_stub):  New stub for catch_errors.
(solib_add):  Avoid output if !from_tty.  Catch errors rather
than just calling symbol_file_add and bombing.
(solib_create_inferior_hook):  Interface with the target process
to let it read and alloc shared libs, then figure out what it did.

* core.c (validate_files):  Fix typo, soften warning.
(Fix from Hiroto Kagotani <kagotani@cs.titech.ac.jp>.)

* utils.c (fputs_demangled):  Avoid duplicate printing if
demangling is off.  (Fix from J.T. Conklin <jtc@cayenne.com>.)

* infrun.c (proceed):  Cast -1 to (CORE_ADDR) before comparing.
(Fix from pierre@la.tce.com (Pierre Willard).)

* main.c (catch_errors):  Change argument to a char * from an int,
since a char * can point to a struct full of glop, but an int
is not guaranteed to be able to hold a pointer.
* breakpoint.c (breakpoint_cond_eval, bpstat_stop_status,
breakpoint_re_set_one, breakpoint_re_set):  Adapt.
* core.c (core_open, solib_add_stub):  Adapt.
* remote-vx.c (symbol_stub, add_symbol_stub, callers):  Adapt.
1991-09-04 07:43:50 +00:00
John Gilmore
5ac449d90c * solib.c (solib_add): New argument is the target_ops whose
section list is to be added to, if any.  Reallocate the
        sections in that target to add any that come from shared libs.
        (throughout) so_sections renamed to sections.
        (solib_xfer_memory):  Deleted.
        * tm-sunos.h (SOLIB_ADD):  Add target argument.
        (SOLIB_XFER_MEMORY):  Delete.

        * xm-sun3os4.h, xm-sun4os4.h:  Define BROKEN_LARGE_ALLOCA,
        and add comment explaining shared library screw.
1991-08-14 00:02:26 +00:00
John Gilmore
99a7de40cb Change GDB over to GNU General Public License version 2. 1991-06-04 07:31:55 +00:00
Jim Kingdon
d0237a54e5 * Shared libaray/corefile changes from Peter Schauer:
core.c (core_close): Call CLEAR_SOLIB.
	(core_open): Remove comment about "should deal with shared lib".
	(core_xfer_memory): If we can't xfer the usual way, try the
	shared libraries.
	solib.c (so_list): New fields so_bfd and so_sections{,_end}.
	(find_solib): Use solib_map_sections to get ld_text.
	(solib_map_sections, solib_xfer_memory): New functions.
	(clear_solib): Free so_sections and close so_bfd.
	tm-sunos.h: Add solib_xfer_memory, solib_add.
1991-04-23 00:05:24 +00:00
K. Richard Pixley
dd3b648e8b Johns release 1991-03-28 16:28:29 +00:00