Hi Manoj, On Sat, 2021-02-06 at 07:03 +0000, Manoj Kumar via Elfutils-devel wrote: > Hi,Using dyninst, I am trying to access local variables and arguments > of a function which is part of a go binary.To get local variables, > dyninst uses libdw to find all the modules. It uses dwarf_nextcu > function of libdw to find all the modules of binary.When I compile a > go binary using "go build filename.go" then dwarf_nextcu finds all > the modules (almost 118) and dyninst is able to access local > variables and arguments of any function.But when I compile a go > binary with linkshared option "go build -linkshared filename.go" > then dwarf_nextcu finds only 5 modules. Due to that, dyninst is not > able to access any variable of a function. > Does go binary with linkshared option has different version of dwarf? > Could you please suggest how to use libdw for go binary with > linkshared option.
Could you explain what the linkshared option is and what it does? How does the generated DWARF differ when using or not using that option? Thanks, Mark