mirror of https://github.com/yshui/picom.git
limit the number of stack frames we get
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
40be723870
commit
0cd4b26663
|
@ -22,7 +22,7 @@ void backtrace() {
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
size_t buffer_offset = 0;
|
size_t buffer_offset = 0;
|
||||||
while (unw_step(&cursor)) {
|
while (unw_step(&cursor) && n < 10) {
|
||||||
unw_word_t ip, sp, off;
|
unw_word_t ip, sp, off;
|
||||||
|
|
||||||
unw_get_reg(&cursor, UNW_REG_IP, &ip);
|
unw_get_reg(&cursor, UNW_REG_IP, &ip);
|
||||||
|
|
Loading…
Reference in New Issue