mirror of
https://github.com/golang/go
synced 2024-11-18 04:04:49 -07:00
[dev.link] cmd/link: dump symbol info on crash under -v
If the linker panics, it usually helps dumping all symbols' information for debugging. Do it under -v. Change-Id: I66f9e32a0133e763a631f17a218dcdc805c5df2f Reviewed-on: https://go-review.googlesource.com/c/go/+/242078 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
f3a29d3a34
commit
5698ec36a8
@ -136,6 +136,11 @@ func Main(arch *sys.Arch, theArch Arch) {
|
||||
|
||||
objabi.Flagparse(usage)
|
||||
|
||||
if ctxt.Debugvlog > 0 {
|
||||
// dump symbol info on crash
|
||||
defer func() { ctxt.loader.Dump() }()
|
||||
}
|
||||
|
||||
switch *flagHeadType {
|
||||
case "":
|
||||
case "windowsgui":
|
||||
|
Loading…
Reference in New Issue
Block a user