[CRIU] [PATCH 31/44] cr-dump.c: introduced the macro TI_SP to access the stack pointer resgister in a machine-independent way.

Alexander Kartashov alekskartashov at parallels.com
Mon Jan 7 10:05:00 EST 2013


Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 arch/x86/include/asm/types.h |    2 ++
 cr-dump.c                    |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 6035fb3..626b9ac 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -256,4 +256,6 @@ typedef struct {
 
 #define CORE_THREAD_INFO(core) core->thread_info
 
+#define TI_SP(core) ((core)->thread_info->gpregs->sp)
+
 #endif /* __CR_ASM_TYPES_H__ */
diff --git a/cr-dump.c b/cr-dump.c
index a6349e6..ae2e9d9 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -764,7 +764,7 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
 	if (ret)
 		goto err_free;
 
-	mark_stack_vma(core->thread_info->gpregs->sp, vma_area_list);
+	mark_stack_vma(TI_SP(core), vma_area_list);
 
 	ret = get_task_futex_robust_list(pid, core->thread_core);
 	if (ret)
-- 
1.7.10.4



More information about the CRIU mailing list