Fixed call frame info (for gdb's bt command)

This commit is contained in:
Dmitry Boulytchev 2020-11-16 20:49:07 +03:00
parent 6822582552
commit 1849c7029b
2 changed files with 5 additions and 4 deletions

View file

@ -436,8 +436,8 @@ let compile cmd env imports code =
(List.flatten @@ List.map stabs_scope scopes)
)
@
[Meta "\t.cfi_startproc"; Meta "\t.cfi_adjust_cfa_offset\t4"] @
(if has_closure then [Push edx; Meta "\t.cfi_adjust_cfa_offset\t4"] else []) @
[Meta "\t.cfi_startproc"] @
(if has_closure then [Push edx] else []) @
(if f = cmd#topname
then
[Mov (M "_init", eax);
@ -450,7 +450,8 @@ let compile cmd env imports code =
else []
) @
[Push ebp;
Meta "\t.cfi_adjust_cfa_offset\t4";
Meta ("\t.cfi_def_cfa_offset\t" ^ if has_closure then "12" else "8");
Meta ("\t.cfi_offset 5, -" ^ if has_closure then "12" else "8");
Mov (esp, ebp);
Meta "\t.cfi_def_cfa_register\t5";
Binop ("-", M ("$" ^ env#lsize), esp);

View file

@ -1 +1 @@
let version = "Version 1.00, 695ddc7d8, Sat Oct 31 02:59:20 2020 +0300"
let version = "Version 1.00, 682258255, Mon Nov 16 16:20:19 2020 +0300"