v icon indicating copy to clipboard operation
v copied to clipboard

Update thirdparty/libbacktrace from libbacktrace project

Open lcheylus opened this issue 1 year ago • 2 comments

Describe the bug

Sources for thirdparty/libbacktrace have not been updated since May 2022 => PR #14277 by @nedpals

Master repository for libbacktrace have commits since this date of import in thirdparty => https://github.com/ianlancetaylor/libbacktrace/

Reproduction Steps

  • Clone V sources from Git
  • git log thirdparty/libbacktrace

Expected Behavior

thirdparty/libbacktrace sources synced with https://github.com/ianlancetaylor/libbacktrace/

Current Behavior

No issue with current version of thirdparty/libbacktrace

Possible Solution

  • Sync thirdparty/libbacktrace sources with https://github.com/ianlancetaylor/libbacktrace/
  • Use "amalgamation" to merge libbacktrace sources in an unique file thirdparty/libbacktrace/base.c

Additional Information/Context

No response

V version

V 0.4.7 c866e37

Environment details (OS name and version, etc.)

V full version: V 0.4.7 c866e37 OS: openbsd, 7.6, GENERIC.MP#312 Processor: 2 cpus, 64bit, little endian

getwd: /home/fox/dev/vlang.git vexe: /home/fox/dev/vlang.git/v vexe mtime: 2024-09-20 08:44:43

vroot: OK, value: /home/fox/dev/vlang.git VMODULES: OK, value: /home/fox/.vmodules VTMP: OK, value: /tmp/v_1000

Git version: git version 2.46.1 Git vroot status: weekly.2024.37-32-g7af312c5 .git/config present: true

CC version: OpenBSD clang version 16.0.6 thirdparty/tcc status: thirdparty-openbsd-amd64 8205cc59

[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.

lcheylus avatar Sep 21 '24 05:09 lcheylus

@nedpals You imported libbacktrace for Vlang in PR #14277 (May 2020). We would like to update it.

Please could you describe the process to create C sources for thirdparty/libbacktrace:

  • how to split code in darwin.c, linux.c and windows.c (included in backtrace.c)
  • how to use "amalgamation" to generate an unique base.c file from libbacktrace C sources

lcheylus avatar Sep 21 '24 14:09 lcheylus

@lcheylus I honestly am not sure anymore how I did this as I have not worked on V nor any low-level work for more than a year now. Can't help with you that, I'm sorry.

@spaceface777 also helped in the process so he may be able to help you with that.

nedpals avatar Sep 21 '24 15:09 nedpals