FAQ

On Fri, Sep 12, 2014 at 6:49 AM, Jens Frederich wrote:

Hi all,

I've defined some variables in a .go file:

package main

var (
foo uint8
bar uint64
test_arr [2048]uint8
)

func main() {
}

I want to use absolute address information to measure them with the XCP
protocol (XCP Protocol <http://en.wikipedia.org/wiki/XCP_%28Protocol%29>).
XCP is address orientated, it works very well with any C based binary. If
I've actived MAP or PDB file generation and found the base and relative
address information for all variables in the map file. Is it possible to
dump out the symbol table for a Go binary?
Yes: 'go tool nm binary'.

Can I find the absolute address of foo, bar and test_arr in memory at
runtime?
Yes: &

http://play.golang.org/p/W3ZL8-5Sy1

Russ

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 6 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 12, '14 at 10:49a
activeSep 12, '14 at 2:17p
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase