For the record, I could do what I needed using the `//go:linkname`
directive.
My instrumentation tool injects statements that need features from another
package that I cannot import. So I forward declare functions using a given
link name that is implemented in another package - similarly to
I saw `go tool cover` does it, but I don't see anything else but a simple
call to printer.Fprint(w, f.fset, f.astFile) at
https://github.com/golang/tools/blob/master/cmd/cover/cover.go#L384
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Hello,
I am looking for a way to keep to original token positioning but I cannot
find how to avoid it when using `go/printer` or `go/format`.
Basically, how to make this example print the same string that was parsed:
https://play.golang.org/p/dI7WcevQJAZ
Thanks for your help!
Julio
--
You
By the way, here is the function having this in package `net`:
https://golang.org/src/net/lookup.go#L81
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hello,
Is there any way to avoid the compilation error "*error is not a type" of
this example https://play.golang.org/p/gWNStGSCfTm ?
I understand the variable named `error` hides the type named `error` but is
there some other syntax to specify the error type?
I am facing this issue while
> > But I cannot find any way of assigning a value to the function pointer
> `f` even using the `unsafe` package.
>
> https://play.golang.org/p/qP5kuSCW6dO
>
Thanks, unfortunately the asm shows that what gets into `f` is the stack
address of `f0` and not the address of the function:
LEAQ
using instead `*interface{}` (that I can atomically load +
type-assert + call).
Thanks for your help,
Julio
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
>
> You can create a lookup table at run time. What would change if you
> could do it at link time? Can you show us the code you want to write?
>
This is actually linked to my remark on build-time source instrumentation
on https://github.com/golang/go/issues/35204 : I insert hooks into
I was meaning an equivalent to declaring an extern function using the same name
as the symbol we want. The function address will be the linked symbol address.
I indeed use the reflect package today, but this happen at run time while I
would like to get those values at link time. I'd like to
Hello,
I am wondering if it is possible to get the address of a function but at
link-time. Kind of the equivalent to the C keyword `extern`.
Maybe using the link name directive? But it is not super clear to me.
I would like to get them instead at link time instead of using the gosymtab.
Thank
the resulting
Go package archive in the repo, and simply use some go CLI option in order
to use the correct archive for the target GOOS/GOARCH?
I couldn't find out how to pass such option to the go compiler so far, so I
was hoping for some help.
Thanks for your help,
Julio
--
You received this message
which performs two atomic operations
and possible disable preemption (
https://golang.org/src/sync/atomic/value.go?s=1233:1269#L35).
Thanks for your help,
Julio
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from
wice slower. So it may be a very
good solution for a first linux-only version, as I don't need return probes
(uretprobes seem to be a problem with Go's dynamic stack management).
--
Julio Guerra
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
t doesn't use any plugin interface :(
--
Julio Guerra
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For
ikely the best option for performance and to avoid code
relocation at run time... Unfortunately, the go toolchain currently doesn't
have any "plugin" interface to add extra compilation stages.
--
Julio Guerra
--
You received this message because you are subscribed to the Google Groups
&quo
, which is linux-specific. And at the opposite, there are
user-space binary code instrumentation libraries such as dyninst that
modify the code at run time...
So I am wondering if anyone here has any thoughts on this subject, that
doesn't seem to be solved for Go programs.
Thanks!
Julio
I almost got into the trap with this, trying to prioritize selected
channel...
https://play.golang.org/p/VOrPwx7HC_
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
17 matches
Mail list logo