From edfb1b1bb770d36d98ce5841ab4f6d1bd04c718c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Thu, 16 Jan 2020 17:51:40 +0100 Subject: [PATCH] Added introduction to the documentation --- GetRuntimeAddresses/symbolyze/doc.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 GetRuntimeAddresses/symbolyze/doc.go diff --git a/GetRuntimeAddresses/symbolyze/doc.go b/GetRuntimeAddresses/symbolyze/doc.go new file mode 100644 index 0000000..5f2e7b3 --- /dev/null +++ b/GetRuntimeAddresses/symbolyze/doc.go @@ -0,0 +1,26 @@ +// Copyright note... +/* +Package symbolyze provides a mechanism to search for all occurences of a +certain symbol in a selection mmap'ed ELF binaries of all running processes. + +NewScanner(symbol string, glob string) will setup a Scanner, which will search +for the given symbol name in all mmap'ed ELF-files that match the given +glob-pattern. The glob-pattern is a shell file name pattern, see +filepath.Match. + +The scanner should be populated with callback functions via calls to OnFound(), +before starting the scan by calling Run(). + +For example: + + scanner := symbolyze.NewScanner("_PyRuntime", "*python3*") + + scanner.OnFound(func(pid int, offset uint64) error { + fmt.Println("found symbol in", pid, "in offset", offset") + return nil + }) + + err := scanner.Run() + +*/ +package symbolyze