mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-18 20:58:48 +00:00
Fixed call frame info (for gdb's bt command)
This commit is contained in:
parent
6822582552
commit
1849c7029b
2 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue