hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a129bf33fda5f38248a33c7181752fb018b6bb4a
parent b9b10bd637c502b328c8028ce79070bc3b04481f
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue,  2 Jan 2024 13:24:40 +0100

rt: remove backtrace functionality

Implemented better in debug::

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Drt/+aarch64/backtrace.ha | 18------------------
Drt/+aarch64/getfp.s | 6------
Drt/+riscv64/backtrace.ha | 17-----------------
Drt/+riscv64/getfp.s | 6------
Drt/+x86_64/backtrace.ha | 17-----------------
Drt/+x86_64/getfp.s | 7-------
6 files changed, 0 insertions(+), 71 deletions(-)

diff --git a/rt/+aarch64/backtrace.ha b/rt/+aarch64/backtrace.ha @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MPL-2.0 -// (c) Hare authors <https://harelang.org> - -fn getfp() *frame; - -// Details for a stack frame. A null address indicates that you've reached the -// top of the stack. Contents are architecture-specific. -export type frame = struct { - fp: nullable *frame, - lr: nullable *opaque, -}; - -// Returns the caller's stack frame. Call [[nextframe]] to walk the stack. -export fn backtrace() frame = *getfp(); - -// Returns the frame above the current frame. The current frame must contain a -// non-nullable address. -export fn nextframe(sframe: frame) frame = *(sframe.fp as *frame); diff --git a/rt/+aarch64/getfp.s b/rt/+aarch64/getfp.s @@ -1,6 +0,0 @@ -.section ".text.rt.getfp","ax" -.global rt.getfp -.type rt.getfp,@function -rt.getfp: - mov x0, x29 - ret diff --git a/rt/+riscv64/backtrace.ha b/rt/+riscv64/backtrace.ha @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MPL-2.0 -// (c) Hare authors <https://harelang.org> - -fn getfp() *frame; - -// Details for a stack frame. A null address indicates that you've reached the -// top of the stack. Contents are architecture-specific. -export type frame = struct { - addr: nullable *frame, -}; - -// Returns the caller's stack frame. Call [[nextframe]] to walk the stack. -export fn backtrace() frame = *getfp(); - -// Returns the frame above the current frame. The current frame must contain a -// non-nullable address. -export fn nextframe(sframe: frame) frame = *(sframe.addr as *frame); diff --git a/rt/+riscv64/getfp.s b/rt/+riscv64/getfp.s @@ -1,6 +0,0 @@ -.section ".text.rt.getfp","ax" -.global rt.getfp -.type rt.getfp,@function -rt.getfp: - mv a0, fp - ret diff --git a/rt/+x86_64/backtrace.ha b/rt/+x86_64/backtrace.ha @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MPL-2.0 -// (c) Hare authors <https://harelang.org> - -fn getfp() *frame; - -// Details for a stack frame. A null address indicates that you've reached the -// top of the stack. Contents are architecture-specific. -export type frame = struct { - addr: nullable *frame, -}; - -// Returns the caller's stack frame. Call [[nextframe]] to walk the stack. -export fn backtrace() frame = *getfp(); - -// Returns the frame above the current frame. The current frame must contain a -// non-nullable address. -export fn nextframe(sframe: frame) frame = *(sframe.addr as *frame); diff --git a/rt/+x86_64/getfp.s b/rt/+x86_64/getfp.s @@ -1,7 +0,0 @@ -.section ".text.rt.getfp","ax" -.global rt.getfp -.type rt.getfp,@function -rt.getfp: - endbr64 - mov (%rbp),%rax - ret