Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
HugeYuan
delve
提交
775c923e
D
delve
项目概览
HugeYuan
/
delve
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
delve
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
775c923e
编写于
10月 22, 2020
作者:
A
Alessandro Arzilli
提交者:
GitHub
10月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
proc: support reading deferred calls' arguments on linux/arm64 (#2210)
上级
1a782d32
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
10 deletion
+20
-10
Documentation/backend_test_health.md
Documentation/backend_test_health.md
+1
-2
pkg/proc/arch.go
pkg/proc/arch.go
+1
-0
pkg/proc/arm64_arch.go
pkg/proc/arm64_arch.go
+1
-0
pkg/proc/proc_test.go
pkg/proc/proc_test.go
+0
-1
pkg/proc/stack.go
pkg/proc/stack.go
+17
-7
未找到文件。
Documentation/backend_test_health.md
浏览文件 @
775c923e
...
...
@@ -3,10 +3,9 @@ Tests skipped by each supported backend:
*
386 skipped = 2.1% (3/145)
*
1 broken
*
2 broken - cgo stacktraces
*
arm64 skipped = 2.
8% (4
/145)
*
arm64 skipped = 2.
1% (3
/145)
*
2 broken
*
1 broken - global variable symbolication
*
1 broken - reading defers
*
darwin/lldb skipped = 0.69% (1/145)
*
1 upstream issue
*
freebsd skipped = 7.6% (11/145)
...
...
pkg/proc/arch.go
浏览文件 @
775c923e
...
...
@@ -15,6 +15,7 @@ type Arch struct {
breakpointInstruction
[]
byte
breakInstrMovesPC
bool
derefTLS
bool
usesLR
bool
// architecture uses a link register, also called RA on some architectures
// asmDecode decodes the assembly instruction starting at mem[0:] into asmInst.
// It assumes that the Loc and AtPC fields of asmInst have already been filled.
...
...
pkg/proc/arm64_arch.go
浏览文件 @
775c923e
...
...
@@ -40,6 +40,7 @@ func ARM64Arch(goos string) *Arch {
DwarfRegisterToString
:
arm64DwarfRegisterToString
,
inhibitStepInto
:
func
(
*
BinaryInfo
,
uint64
)
bool
{
return
false
},
asmDecode
:
arm64AsmDecode
,
usesLR
:
true
,
}
}
...
...
pkg/proc/proc_test.go
浏览文件 @
775c923e
...
...
@@ -4160,7 +4160,6 @@ func TestNextUnknownInstr(t *testing.T) {
}
func
TestReadDeferArgs
(
t
*
testing
.
T
)
{
skipOn
(
t
,
"broken - reading defers"
,
"arm64"
)
var
tests
=
[]
struct
{
frame
,
deferCall
int
a
,
b
int64
...
...
pkg/proc/stack.go
浏览文件 @
775c923e
...
...
@@ -660,13 +660,23 @@ func (d *Defer) EvalScope(thread Thread) (*EvalScope, error) {
}
// The arguments are stored immediately after the defer header struct, i.e.
// addr+sizeof(_defer). Since CFA in go is always the address of the first
// argument, that's what we use for the value of CFA.
// For SP we use CFA minus the size of one pointer because that would be
// the space occupied by pushing the return address on the stack during the
// CALL.
scope
.
Regs
.
CFA
=
(
int64
(
d
.
variable
.
Addr
)
+
d
.
variable
.
RealType
.
Common
()
.
ByteSize
)
scope
.
Regs
.
Reg
(
scope
.
Regs
.
SPRegNum
)
.
Uint64Val
=
uint64
(
scope
.
Regs
.
CFA
-
int64
(
bi
.
Arch
.
PtrSize
()))
// addr+sizeof(_defer).
if
!
bi
.
Arch
.
usesLR
{
// On architectures that don't have a link register CFA is always the address of the first
// argument, that's what we use for the value of CFA.
// For SP we use CFA minus the size of one pointer because that would be
// the space occupied by pushing the return address on the stack during the
// CALL.
scope
.
Regs
.
CFA
=
(
int64
(
d
.
variable
.
Addr
)
+
d
.
variable
.
RealType
.
Common
()
.
ByteSize
)
scope
.
Regs
.
Reg
(
scope
.
Regs
.
SPRegNum
)
.
Uint64Val
=
uint64
(
scope
.
Regs
.
CFA
-
int64
(
bi
.
Arch
.
PtrSize
()))
}
else
{
// On architectures that have a link register CFA and SP have the same
// value but the address of the first argument is at CFA+ptrSize so we set
// CFA to the start of the argument frame minus one pointer size.
scope
.
Regs
.
CFA
=
int64
(
d
.
variable
.
Addr
)
+
d
.
variable
.
RealType
.
Common
()
.
ByteSize
-
int64
(
bi
.
Arch
.
PtrSize
())
scope
.
Regs
.
Reg
(
scope
.
Regs
.
SPRegNum
)
.
Uint64Val
=
uint64
(
scope
.
Regs
.
CFA
)
}
rdr
:=
scope
.
Fn
.
cu
.
image
.
dwarfReader
rdr
.
Seek
(
scope
.
Fn
.
offset
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录