(opts *BrkOptions)
| 49 | } |
| 50 | |
| 51 | func 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 | |
| 78 | func ParseMsg(payload []byte) (*BrkOptions, error) { |
| 79 | brk := new(BrkOptions) |
no test coverage detected