diff options
author | John Gilmore <gnu@cygnus> | 1991-09-04 07:43:50 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-09-04 07:43:50 +0000 |
commit | bdbd5f508635fa9581f85bd6ba7ec3620970674d (patch) | |
tree | 15b699530b87aa2ae144216c734ecd2bcb9c474a /gdb/remote-vx.c | |
parent | 7c589d2562b1b91366f01b95daa7b47a81ccb19d (diff) | |
download | gdb-bdbd5f508635fa9581f85bd6ba7ec3620970674d.zip gdb-bdbd5f508635fa9581f85bd6ba7ec3620970674d.tar.gz gdb-bdbd5f508635fa9581f85bd6ba7ec3620970674d.tar.bz2 |
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.
Diffstat (limited to 'gdb/remote-vx.c')
-rw-r--r-- | gdb/remote-vx.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c index 171e712..59cd053 100644 --- a/gdb/remote-vx.c +++ b/gdb/remote-vx.c @@ -1340,16 +1340,15 @@ vx_wait (status) static int symbol_stub (arg) - int arg; + char *arg; { - char *bootFile = (char *)arg; - symbol_file_command (bootFile, 0); + symbol_file_command (arg, 0); return 1; } static int add_symbol_stub (arg) - int arg; + char *arg; { struct ldfile *pLoadFile = (struct ldfile *)arg; @@ -1413,7 +1412,7 @@ vx_open (args, from_tty) { if (*bootFile) { printf_filtered ("\t%s: ", bootFile); - if (catch_errors (symbol_stub, (int)bootFile, + if (catch_errors (symbol_stub, bootFile, "Error reading symbols from boot file")) puts_filtered ("ok\n"); } else if (from_tty) @@ -1450,7 +1449,7 @@ vx_open (args, from_tty) /* Botches, FIXME: (1) Searches the PATH, not the source path. (2) data and bss are assumed to be at the usual offsets from text. */ - catch_errors (add_symbol_stub, (int)pLoadFile, (char *)0); + catch_errors (add_symbol_stub, (char *)pLoadFile, (char *)0); #endif } printf_filtered ("Done.\n"); |