From: Youling Tang <tangyouling@loongson.cn>
To: Huacai Chen <chenhuacai@kernel.org>, Qing Zhang <zhangqing@loongson.cn>
Cc: WANG Xuerui <kernel@xen0n.name>,
loongarch@lists.linux.dev, LKML <linux-kernel@vger.kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Jinyang He <hejinyang@loongson.cn>
Subject: Re: [PATCH 2/4] LoongArch: Add prologue unwinder support
Date: Tue, 2 Aug 2022 09:30:00 +0800 [thread overview]
Message-ID: <6e6a7219-8666-bd9e-770a-e60e4b329832@loongson.cn> (raw)
In-Reply-To: <CAAhV-H4hR-Xdk5EpakR9ft0J+V5qgPj5q2T=zjh1SHMnnHK1vw@mail.gmail.com>
On 08/01/2022 11:26 PM, Huacai Chen wrote:
>> diff --git a/arch/loongarch/include/asm/unwind.h b/arch/loongarch/include/asm/unwind.h
>> index 243330b39d0d..f9f73a26504e 100644
>> --- a/arch/loongarch/include/asm/unwind.h
>> +++ b/arch/loongarch/include/asm/unwind.h
>> @@ -14,6 +14,14 @@
>> struct unwind_state {
>> struct stack_info stack_info;
>> struct task_struct *task;
>> +#if defined(CONFIG_UNWINDER_PROLOGUE)
>> + unsigned long ra;
>> + bool enable;
>> + /*
>> + * Enable is the prologue analysis method
>> + * otherwise is the way to guess.
>> + */
>> +#endif
>> unsigned long sp, pc;
>> bool first;
>> bool error;
> This data struct makes me very uncomfortable, especially "enable" and
> the #ifdef, maybe we can rework it like this?
>
> #define UNWINDER_GUESS 0
> #define UNWINDER_PROLOGURE 1
Maybe it's better to define with enum type?
enum unwind_type {
UNWINDER_GUESS,
UNWINDER_PROLOGURE,
};
Youling
> struct unwind_state {
> char type; /* UNWINDER_xxx */
> bool first, error;
> unsigned long sp, pc, ra;
> struct task_struct *task;
> struct stack_info stack_info;
> };
>
> Huacai
next prev parent reply other threads:[~2022-08-02 1:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 12:17 [PATCH 0/4] LoongArch: Add " Qing Zhang
2022-08-01 12:17 ` [PATCH 1/4] LoongArch: Add guess " Qing Zhang
2022-08-01 15:28 ` Huacai Chen
2022-08-01 12:17 ` [PATCH 2/4] LoongArch: Add prologue " Qing Zhang
2022-08-01 15:26 ` Huacai Chen
2022-08-02 1:30 ` Youling Tang [this message]
2022-08-02 1:34 ` Huacai Chen
2022-08-02 1:39 ` Xi Ruoyao
2022-08-02 1:53 ` Huacai Chen
2022-08-01 12:17 ` [PATCH 3/4] LoongArch: Add stacktrace support Qing Zhang
2022-08-01 15:30 ` Huacai Chen
2022-08-02 1:19 ` zhangqing
2022-08-02 1:30 ` Huacai Chen
2022-08-02 2:01 ` Qing Zhang
2022-08-13 22:29 ` kernel test robot
2022-08-14 5:31 ` kernel test robot
2022-08-01 12:17 ` [PATCH 4/4] LoongArch: Add USER_STACKTRACE support Qing Zhang
2022-08-01 15:31 ` Huacai Chen
2022-08-01 15:34 ` [PATCH 0/4] LoongArch: Add unwinder support Huacai Chen
2022-08-02 1:15 ` Xi Ruoyao
2022-08-02 1:35 ` zhangqing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e6a7219-8666-bd9e-770a-e60e4b329832@loongson.cn \
--to=tangyouling@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=hejinyang@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=zhangqing@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®