[minicoredumper] [PATCH 1/3] dump_vma: use mem_end instead of file_end
Simon Marchi
simon.marchi at ericsson.com
Tue Oct 13 19:54:14 CEST 2015
The actual end of the section in memory is saved in mem_end. This causes
some important information that GDB could use to be lost. Also, it makes
sense to use mem_end there if it is used in get_vma_pos.
Additionally, it might be a good idea to add a log in:
/* make sure we have something to dump */
if (start >= end)
return 0;
as this is probably a situation that should not happen, and if it happens
it might be a bug.
Signed-off-by: Simon Marchi <simon.marchi at ericsson.com>
---
src/minicoredumper/corestripper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/minicoredumper/corestripper.c b/src/minicoredumper/corestripper.c
index 300383a..19117b5 100644
--- a/src/minicoredumper/corestripper.c
+++ b/src/minicoredumper/corestripper.c
@@ -1540,8 +1540,8 @@ static int dump_vma(struct dump_info *di, unsigned long start, size_t len,
/* only dump what is actually in VMA */
if (start < tmp->start)
start = tmp->start;
- if (end > tmp->file_end)
- end = tmp->file_end;
+ if (end > tmp->mem_end)
+ end = tmp->mem_end;
/* make sure we have something to dump */
if (start >= end)
--
2.5.1
More information about the minicoredumper
mailing list