Repro
# using latest net5 build on linux-musl x64
$ dotnet --version
5.0.300-preview.21215.17
$ dotnet-sos --version
5.0.217401+e11fe8401a6c8b67dbfe086acef2a75e1b327e04
# create and publish a singlefile app that throws
$ dotnet new console -n app1; cd app1
$ cat > Program.cs <<EOF
using System;
class Program
{
static void Main() => throw new Exception("foo");
}
EOF
$ dotnet publish -c Debug -r linux-musl-x64 -p:'SelfContained=true;PublishSingleFile=true'
# debug with lldb
$ cd bin/Debug/net6.0/linux-musl-x64/publish
$ lldb ./app1
(lldb) target create "app1"
Current executable set to '/home/am11/projects/app1/bin/Debug/net5.0/linux-musl-x64/publish/app1' (x86_64).
(lldb) r
Process 2672 launched: '/home/am11/projects/app1/bin/Debug/net5.0/linux-musl-x64/publish/app1' (x86_64)
Unhandled exception. System.Exception: foo
at Program.Main()
Process 2672 stopped
* thread #1, name = 'app1', stop reason = signal SIGABRT
frame #0: 0x00007ffff7fada71 ld-musl-x86_64.so.1`__setjmp + 119
ld-musl-x86_64.so.1`__setjmp:
-> 0x7ffff7fada71 <+119>: retq
ld-musl-x86_64.so.1`getitimer:
0x7ffff7fada72 <+0>: movslq %edi, %rdi
0x7ffff7fada75 <+3>: pushq %rax
0x7ffff7fada76 <+4>: movl $0x24, %eax
(lldb) clrstack
OS Thread Id: 0xa70 (1)
Child SP IP Call Site
00007FFFFFFFD670 00007ffff7fada71 [HelperMethodFrame: 00007fffffffd670]
00007FFFFFFFD7E0 00005554DC3D5869 Program.Main()
Expected
Filename and line number are shown in singlefile, as it does in non-singlefile case; since we have app1.pdb sitting right next to app1 in the current directory and it is a Debug configuration.
e.g.
--- actual
+++ expected
- at Program.Main()
+ at Program.Main() in /home/am11/projects/app1/Program.cs:line 4
Repro
Expected
Filename and line number are shown in singlefile, as it does in non-singlefile case; since we have app1.pdb sitting right next to app1 in the current directory and it is a Debug configuration.
e.g.