-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support rust panic backtrace #414
Conversation
kernel/Cargo.toml
Outdated
@@ -36,6 +36,7 @@ acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git" | |||
intertrait = { path = "src/libs/intertrait" } | |||
linkme = "0.2" | |||
ida = { path = "src/libs/ida" } | |||
mini-backtrace = { path = "/home/yaozhao/github/mini-backtrace", version = "0.1.4" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add a compilation flag to mini-backtrace to get rid of the stack protection in its build.rs. Is there an easy way to do it here?
这个库使用的是本地的地址,我没法测试
…---Original---
From: ***@***.***>
Date: Sun, Oct 29, 2023 21:56 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: Re: [DragonOS-Community/DragonOS] support rust panic backtrace (PR#414)
@zhaoyao73 commented on this pull request.
In kernel/Cargo.toml:
> @@ -36,6 +36,7 @@ acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git" intertrait = { path = "src/libs/intertrait" } linkme = "0.2" ida = { path = "src/libs/ida" } +mini-backtrace = { path = "/home/yaozhao/github/mini-backtrace", version = "0.1.4" }
need to add a compilation flag to mini-backtrace to get rid of the stack protection in its build.rs. Is there an easy way to do it here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
这个麻烦先push一下到你的github仓库哈~
当然,把这个库copy到kernel/src/libs下面,创建一个子文件夹,我觉得会更OK
…---Original---
From: ***@***.***>
Date: Sun, Oct 29, 2023 21:56 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: Re: [DragonOS-Community/DragonOS] support rust panic backtrace (PR#414)
@zhaoyao73 commented on this pull request.
In kernel/Cargo.toml:
> @@ -36,6 +36,7 @@ acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git" intertrait = { path = "src/libs/intertrait" } linkme = "0.2" ida = { path = "src/libs/ida" } +mini-backtrace = { path = "/home/yaozhao/github/mini-backtrace", version = "0.1.4" }
need to add a compilation flag to mini-backtrace to get rid of the stack protection in its build.rs. Is there an easy way to do it here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
只是想让你先看一下。现在把mini-backtrace的克隆上传了。应该可以测试了,我都是用gdb手工制造panic测试的,但是serial_opt.txt的打印似乎乱掉了,似乎打印没有加锁似的。但gdb下是打symbol了。 |
好嘞,我明天看看!
话说,gdb怎么手动制造Panic呀
…---Original---
From: ***@***.***>
Date: Mon, Oct 30, 2023 19:27 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [DragonOS-Community/DragonOS] support rust panic backtrace (PR#414)
这个库使用的是本地的地址,我没法测试
…
---Original--- From: @.> Date: Sun, Oct 29, 2023 21:56 PM To: @.>; Cc: @.>; Subject: Re: [DragonOS-Community/DragonOS] support rust panic backtrace (PR#414) @zhaoyao73 commented on this pull request. In kernel/Cargo.toml: > @@ -36,6 +36,7 @@ acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git" intertrait = { path = "src/libs/intertrait" } linkme = "0.2" ida = { path = "src/libs/ida" } +mini-backtrace = { path = "/home/yaozhao/github/mini-backtrace", version = "0.1.4" } need to add a compilation flag to mini-backtrace to get rid of the stack protection in its build.rs. Is there an easy way to do it here? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>
只是想让你先看一下。现在把mini-backtrace的克隆上传了。应该可以测试了,我都是用gdb手工制造panic测试的,但是serial_opt.txt的打印似乎乱掉了,似乎打印没有加锁似的。但gdb下是打symbol了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
就是直接改某些值,走panic 分支。dragonOS还不太会使用,制造panic还没那么容易,自己加一个也行,但不想加在critical path上,用的熟些就可以这么做了。 |
由于这个pr需要更正,请开一下 |
Sorry,难崩,我刚才force push了一下,然后pr被自动关闭了。 |
mini-backtrace has llvm's unwind cpp source to support backtrace/unwind. as unwind/backtrace needs dynamically allocates memory, mini-backtrace uses stack memory to capture fixed number of backtrace to avoid heap allocation.
as unwind library needed, it needs to turn on eh_frame_hdr