Skip to content

Commit

Permalink
support uprobe exit read
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeFlowerX committed Feb 7, 2024
1 parent 20cb494 commit a712667
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions user/config/config_uprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

type UprobeArgs struct {
Index uint32
EnterKey uint32
LibPath string
RealFilePath string
Name string
Expand All @@ -23,12 +24,16 @@ type UprobeArgs struct {
}

func (this *UprobeArgs) GetExitPoint(index int) *UprobeArgs {
// 这样标记为需要保存这个位置的寄存器
this.EnterKey = this.Index + 1
point := &UprobeArgs{}
point.Index = uint32(index)
// 这样标记为需要从这里取出寄存器
point.EnterKey = this.EnterKey
point.LibPath = this.LibPath
point.RealFilePath = this.RealFilePath
point.Name = this.Name
point.Symbol = this.Symbol
point.Name = fmt.Sprintf("0x%x", this.ExitOffset)
point.Symbol = ""
point.Offset = this.ExitOffset
point.NonElfOffset = this.NonElfOffset
point.ArgsStr = this.ArgsStr
Expand All @@ -39,6 +44,7 @@ func (this *UprobeArgs) GetExitPoint(index int) *UprobeArgs {

func (this *UprobeArgs) GetConfig() UprobePointOpKeyConfig {
config := UprobePointOpKeyConfig{}
config.EnterKey = this.EnterKey
config.Signal = this.KillSignal
for _, point_arg := range this.PointArgs {
config.AddPointArg(point_arg)
Expand Down

0 comments on commit a712667

Please sign in to comment.