Closed c01dkit closed 1 year ago
Coredump is generated when a process exits abnormally, e.g. abort()
was called. UC_ERR_READ_UNMAPPED
means a normal exit, not an abort()
.
To save a "coredump", you may look at context API.
Thanks for reply!
I found functions like uc_context_*
, uc_mem_*
and uc_reg_*
. However, it seems that there is no single function aims to save all information. ( I'm not sure )
Maybe I should try to combine them.
uc_context will include both cpu registers and memory if you tweak it by uc_ctl api.
From: Boyu Chang @.> Sent: Wednesday, August 2, 2023 9:56:26 AM To: unicorn-engine/unicorn @.> Cc: lazymio @.>; Comment @.> Subject: Re: [unicorn-engine/unicorn] How to generate a coredump when emulation hits a crash? (Issue #1858)
Thanks for reply! I found functions like uccontext, ucmem and ucreg*. However, it seems that there is no single function aims to save all information. ( I'm not sure ) Maybe I should try to combine them.
― Reply to this email directly, view it on GitHubhttps://github.com/unicorn-engine/unicorn/issues/1858#issuecomment-1661369546, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHJULO54XXW7HMWGLYI64IDXTGXUVANCNFSM6AAAAAA27URECY. You are receiving this because you commented.Message ID: @.***>
Thanks for reply! I think this issue could be closed : )
Hi there, Does unicorn support generate a coredump (to save memory data, registers, environment variables, etc.) when emulation hits a crash ( such as UC_ERR_READ_UNMAPPED) ? A coredump can automatically generates in normal linux system. I'm wondering if unicorn has already support the same feature, or one needs to implement such mechanism manually (in exit handler) ?