diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2009-12-01 22:46:07 +0000 |
---|---|---|
committer | Joseph Myers <jsm@polyomino.org.uk> | 2009-12-01 22:46:07 +0000 |
commit | 575d4a276cceae9dca086aced83dece6146a5fe6 (patch) | |
tree | d0ce1987be8a7da2084190ba01466ff6f4adfbae /gdb/gcore.c | |
parent | 9104dec90808466c32a1ad779f5a5f245f37c0aa (diff) | |
download | gdb-575d4a276cceae9dca086aced83dece6146a5fe6.tar.gz |
* gcore.c: Include solib.h.
(gcore_create_callback): Call solib_keep_data_in_core when
considering not saving memory in core file.
* solib-svr4.c (svr4_keep_data_in_core): New.
(_initialize_svr4_solib): Initialize
svr4_so_ops.keep_data_in_core.
* solib.c (solib_keep_data_in_core): New.
* solib.h (solib_keep_data_in_core): Declare.
* solist.h (struct target_so_ops): Add keep_data_in_core.
Diffstat (limited to 'gdb/gcore.c')
-rw-r--r-- | gdb/gcore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c index d1f8b4933cb..6d6ca47d146 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -24,6 +24,7 @@ #include "inferior.h" #include "gdbcore.h" #include "objfiles.h" +#include "solib.h" #include "symfile.h" #include "arch-utils.h" #include "completer.h" @@ -389,7 +390,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, return 0; } - if (write == 0) + if (write == 0 && !solib_keep_data_in_core (vaddr, size)) { /* See if this region of memory lies inside a known file on disk. If so, we can avoid copying its contents by clearing SEC_LOAD. */ |