[NDS32] Sync glibc and kernel structure, all use _rt_sigframe.
libgcc/ * config/nds32/linux-unwind.h (struct _rt_sigframe): Use struct ucontext_t type instead. (nds32_fallback_frame_state): Remove struct _sigframe statement. From-SVN: r264461
This commit is contained in:
parent
229a033dac
commit
36ff254bf6
|
@ -1,3 +1,9 @@
|
||||||
|
2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
|
||||||
|
|
||||||
|
* config/nds32/linux-unwind.h (struct _rt_sigframe): Use struct
|
||||||
|
ucontext_t type instead.
|
||||||
|
(nds32_fallback_frame_state): Remove struct _sigframe statement.
|
||||||
|
|
||||||
2018-09-21 Kito Cheng <kito.cheng@gmail.com>
|
2018-09-21 Kito Cheng <kito.cheng@gmail.com>
|
||||||
|
|
||||||
* config/nds32/t-nds32-glibc: New file.
|
* config/nds32/t-nds32-glibc: New file.
|
||||||
|
|
|
@ -32,19 +32,16 @@
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
#include <sys/ucontext.h>
|
||||||
|
|
||||||
/* Exactly the same layout as the kernel structures, unique names. */
|
/* Exactly the same layout as the kernel structures, unique names. */
|
||||||
|
|
||||||
/* arch/nds32/kernel/signal.c */
|
/* arch/nds32/kernel/signal.c */
|
||||||
struct _sigframe {
|
|
||||||
struct ucontext uc;
|
|
||||||
unsigned long retcode;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _rt_sigframe {
|
struct _rt_sigframe {
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
struct _sigframe sig;
|
struct ucontext_t uc;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SIGRETURN 0xeb0e0a64
|
#define SIGRETURN 0xeb0e0a64
|
||||||
#define RT_SIGRETURN 0xab150a64
|
#define RT_SIGRETURN 0xab150a64
|
||||||
|
|
||||||
|
@ -80,17 +77,10 @@ nds32_fallback_frame_state (struct _Unwind_Context *context,
|
||||||
SWI_SYS_SIGRETURN -> (0xeb0e0a64)
|
SWI_SYS_SIGRETURN -> (0xeb0e0a64)
|
||||||
SWI_SYS_RT_SIGRETURN -> (0xab150a64)
|
SWI_SYS_RT_SIGRETURN -> (0xab150a64)
|
||||||
FIXME: Currently we only handle little endian (EL) case. */
|
FIXME: Currently we only handle little endian (EL) case. */
|
||||||
if (pc[0] == SIGRETURN)
|
if (pc[0] == SIGRETURN || pc[0] == RT_SIGRETURN)
|
||||||
{
|
{
|
||||||
/* Using '_sigfame' memory address to locate kernal's sigcontext.
|
/* Using '_sigfame' memory address to locate kernal's sigcontext.
|
||||||
The sigcontext structures in arch/nds32/include/asm/sigcontext.h. */
|
The sigcontext structures in arch/nds32/include/asm/sigcontext.h. */
|
||||||
struct _sigframe *rt_;
|
|
||||||
rt_ = context->cfa;
|
|
||||||
sc_ = &rt_->uc.uc_mcontext;
|
|
||||||
}
|
|
||||||
else if (pc[0] == RT_SIGRETURN)
|
|
||||||
{
|
|
||||||
/* Using '_sigfame' memory address to locate kernal's sigcontext. */
|
|
||||||
struct _rt_sigframe *rt_;
|
struct _rt_sigframe *rt_;
|
||||||
rt_ = context->cfa;
|
rt_ = context->cfa;
|
||||||
sc_ = &rt_->sig.uc.uc_mcontext;
|
sc_ = &rt_->sig.uc.uc_mcontext;
|
||||||
|
|
Loading…
Reference in New Issue