MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / BrkIt

Function BrkIt

user/rpc/rpc.go:51–76  ·  view source on GitHub ↗
(opts *BrkOptions)

Source from the content-addressed store, hash-verified

49}
50
51func BrkIt(opts *BrkOptions) {
52 if opts.BrkPid != -1 {
53 event.CacheMaps(uint32(opts.BrkPid))
54 }
55 mod := module.GetModuleByName(module.MODULE_NAME_BRK)
56 var mconfig = config.NewModuleConfig()
57 mconfig.Debug = Gconfig.Debug
58 mconfig.ExternalBTF = Gconfig.ExternalBTF
59 mconfig.Buffer = Gconfig.Buffer
60 mconfig.ManualStack = Gconfig.ManualStack
61 mconfig.UnwindStack = Gconfig.UnwindStack
62 mconfig.StackSize = Gconfig.StackSize
63 mconfig.ShowRegs = Gconfig.ShowRegs
64 mconfig.GetOff = Gconfig.GetOff
65 mconfig.BrkPid = opts.BrkPid
66 mconfig.BrkAddr = opts.BrkAddr
67 mconfig.BrkLen = opts.BrkLen
68 mconfig.BrkType = opts.BrkType
69 mconfig.BrkKernel = false
70 mod.Init(Ctx, Logger, mconfig)
71 err := mod.Run()
72 if err != nil {
73 Logger.Printf("%s\tmodule Run failed, [skip it]. error:%+v", mod.Name(), err)
74 os.Exit(1)
75 }
76}
77
78func ParseMsg(payload []byte) (*BrkOptions, error) {
79 brk := new(BrkOptions)

Callers 1

handleConnectionFunction · 0.85

Calls 6

CacheMapsFunction · 0.92
GetModuleByNameFunction · 0.92
NewModuleConfigFunction · 0.92
InitMethod · 0.65
RunMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected