aboutsummaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2000-08-27 04:21:35 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2000-08-27 04:21:35 +0000
commit8e860359d12cb3bcd60f1237576b85c5c6c8c7e5 (patch)
tree2722e2448de21c526ea804a942611182e00fb112 /gdb/corelow.c
parent69eb4bbf8e5cc604098d3136fc7d70ea94305afb (diff)
downloadfsf-binutils-gdb-8e860359d12cb3bcd60f1237576b85c5c6c8c7e5.zip
fsf-binutils-gdb-8e860359d12cb3bcd60f1237576b85c5c6c8c7e5.tar.gz
fsf-binutils-gdb-8e860359d12cb3bcd60f1237576b85c5c6c8c7e5.tar.bz2
* win32-nat.c (dll_symbol_command): Tack a .dll on the end of a supplied
argument if it is missing an extension. * corelow.c: Define O_BINARY if it isn't defined. (core_open): Open core file in binary mode. * config/i386/tm-cygwin.h (child_clear_solibs): Rename from child_clear_solib. * config/i386/cygwin.mh: Add dependency from corelow.o. * win32-nat.c (register_loaded_dll): New function. Add dll to the list of currently loaded dlls. (handle_load_dll): Use register_loaded_dll. (child_solib_add): Distinguish between active process and core targets. (solib_symbols_add): Load symbols from loaded dll. (core_dll_symbols_add): New function. Load symbols from dll referenced in core. (core_section_load_dll_symbols): New function. (dll_code_sections_add): New function. (map_single_dll_code_section): New function. (fetch_elf_core_registers): New function. (_initialize_core_win32): New function.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index b552600..f0d5c3b 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -33,6 +33,10 @@
#include "gdbcore.h"
#include "gdbthread.h"
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
/* List of all available core_fns. On gdb startup, each core file register
reader calls add_core_fns() to register information on each core format it
is prepared to read. */
@@ -275,7 +279,7 @@ core_open (char *filename, int from_tty)
old_chain = make_cleanup (free, filename);
- scratch_chan = open (filename, write_files ? O_RDWR : O_RDONLY, 0);
+ scratch_chan = open (filename, O_BINARY | ( write_files ? O_RDWR : O_RDONLY ), 0);
if (scratch_chan < 0)
perror_with_name (filename);