]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: ensure first instruction of function is stmt
authorDavid Chase <drchase@google.com>
Thu, 5 Apr 2018 15:11:39 +0000 (11:11 -0400)
committerDavid Chase <drchase@google.com>
Fri, 6 Apr 2018 16:05:42 +0000 (16:05 +0000)
commiteda22a06fb507d3ce6a2684bb5e6dbb3cbb57e15
tree077649b80a81cf136e75d88c2db656cfdf053510
parent33eaf75a031694e11981218963f395174baca6e1
cmd/compile: ensure first instruction of function is stmt

In gdb, "b f" gets confused if the first instruction of "f"
is not marked as a statement in the DWARF line table.

To ensure gdb is not confused, move the first statement
marker in "f" to its first instruction.

The screwy-looking conditional for "what's the first
instruction with a statement marker" will become simpler in
the future.

Fixes #24695.

Change-Id: I2eef81676b64d1bd9bff5da03b89b9dc0c18f44f
Reviewed-on: https://go-review.googlesource.com/104955
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/ssa.go