Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: print LLVM instruction in traceback
The old traceback would look like this: # internal/godebug /usr/local/go/src/internal/godebug/godebug.go:101:11: interp: test call <2> 0 <3> 0 traceback: /usr/local/go/src/internal/godebug/godebug.go:101:11: call <2> 0 <3> 0 /usr/local/go/src/internal/godebug: call <1> 0 With this patch, it looks like this: # io/fs /usr/local/go/src/io/fs/fs.go:144:45: interp: test %0 = load %runtime._interface, ptr @"internal/oserror.ErrInvalid", align 8, !dbg !316 traceback: /usr/local/go/src/io/fs/fs.go:144:45: %0 = load %runtime._interface, ptr @"internal/oserror.ErrInvalid", align 8, !dbg !316 /usr/local/go/src/io/fs/fs.go:137:28: %0 = call %runtime._interface @"io/fs.errInvalid"(ptr undef), !dbg !317 For developers (like me) who are familiar with LLVM, this is probably easier to read. For users, I'm not sure: the instructions have quite a lot of distracting fluff in them. But at least it contains the function names that are called (which are not currently present in the old traceback). ...that said, having the LLVM instructions in a bug report is probably going to be easier for people who are familar with LLVM.
- Loading branch information