mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-06 23:58:49 +00:00
better debug support
This commit is contained in:
+13
-2
@@ -321,11 +321,12 @@ function ps1-meta { param(
|
||||
[Parameter(Mandatory=$true)][string[]]$sources,
|
||||
[Parameter(Mandatory=$true)][string]$metadata,
|
||||
[string]$out_root = (join-path $path_build 'gen'),
|
||||
[string[]]$passes = @('--all')
|
||||
[string[]]$passes = @('--all'),
|
||||
[string[]]$extra_args = @()
|
||||
)
|
||||
$script = join-path $path_scripts 'ps1_meta.lua'
|
||||
write-host "ps1-meta $($sources.Count) source(s), passes=$($passes -join ',')" ` -ForegroundColor Magenta
|
||||
$arg_list = @($passes) + @('--metadata', $metadata) + @('--out-root', $out_root)
|
||||
$arg_list = @($passes) + @('--metadata', $metadata) + @('--out-root', $out_root) + @($extra_args)
|
||||
foreach ($s in $sources) { $arg_list += @('--source', $s) }
|
||||
& luajit $script @arg_list
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
@@ -383,6 +384,16 @@ function build-gte_hello {
|
||||
)
|
||||
link-modules $link_modules $elf $link_args
|
||||
make-binary $elf $exe
|
||||
|
||||
# Post-link: emit ONLY build/gen/gdb_tape_atoms_runtime.gdb. The per-source
|
||||
# *.atoms.sourcemap.txt was already generated by the pre-link --all call,
|
||||
# so we skip --atoms-source-map here to avoid re-doing the work. The
|
||||
# gdb-runtime emission requires --elf (for nm-based address lookup) so it
|
||||
# MUST happen post-link. ON by default per user pref 2026-07-11.
|
||||
ps1-meta -sources $atom_sources -metadata $path_atom_metadata `
|
||||
-out_root (join-path $path_build 'gen') `
|
||||
-passes @('--gdb-runtime') `
|
||||
-extra_args @('--elf', $elf)
|
||||
}
|
||||
build-gte_hello
|
||||
|
||||
|
||||
Reference in New Issue
Block a user