This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b33226d76e coredump: coredump_add_memory_region need use flags
b33226d76e is described below
commit b33226d76e89e019506597c8c8c8e78e46499594
Author: anjiahao <[email protected]>
AuthorDate: Fri Aug 16 12:26:53 2024 +0800
coredump: coredump_add_memory_region need use flags
Signed-off-by: anjiahao <[email protected]>
---
include/nuttx/coredump.h | 3 ++-
sched/misc/coredump.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/nuttx/coredump.h b/include/nuttx/coredump.h
index 273c0f7cbf..2fdd7af46f 100644
--- a/include/nuttx/coredump.h
+++ b/include/nuttx/coredump.h
@@ -79,7 +79,8 @@ int coredump_set_memory_region(FAR const struct
memory_region_s *region);
*
****************************************************************************/
-int coredump_add_memory_region(FAR const void *ptr, size_t size);
+int coredump_add_memory_region(FAR const void *ptr, size_t size,
+ uint32_t flags);
/****************************************************************************
* Name: coredump
diff --git a/sched/misc/coredump.c b/sched/misc/coredump.c
index 13947390cb..4f39b51fa4 100644
--- a/sched/misc/coredump.c
+++ b/sched/misc/coredump.c
@@ -768,7 +768,8 @@ int coredump_set_memory_region(FAR const struct
memory_region_s *region)
*
****************************************************************************/
-int coredump_add_memory_region(FAR const void *ptr, size_t size)
+int coredump_add_memory_region(FAR const void *ptr, size_t size,
+ uint32_t flags)
{
FAR struct memory_region_s *region;
size_t count = 1; /* 1 for end flag */
@@ -838,7 +839,7 @@ int coredump_add_memory_region(FAR const void *ptr, size_t
size)
region[count - 1].start = (uintptr_t)ptr;
region[count - 1].end = (uintptr_t)ptr + size;
- region[count - 1].flags = 0;
+ region[count - 1].flags = flags;
region[count].start = 0;
region[count].end = 0;
region[count].flags = 0;