This seems like an [XY Problem](https://xyproblem.info/). Tell us what
problem you are trying to solve rather than the solution you attempted.

On Wed, Apr 26, 2023 at 4:21 PM Chris Zhang <mayerche...@gmail.com> wrote:

> Dear all,
>
> I am trying to dump certain IRNode in *src/cmd/internal/ssagen/ssa.go*
> file in 1.19. Suppose n is an IRNode
> <https://pkg.go.dev/cmd/compile/internal/ir#Node>, then I tried 
> `*fmt.Printf(“%+v”,
> n)*`, and I can see something like
>
> *.    NAME-strong.u esc(no) Class:PPARAM Offset:24 OnStack Used uint64
> tc(1) # itoa.go:88:29*
>
> I am interested in the last part “*itoa.go:88:29*” and I wonder how to
> get this substring. Based on my understanding, “%+v” basically print all
> fields in a struct. Also seems like these two statements are equivalent:
> `fmt.Printf(“%+v”, n)` versus
> `fmt.Printf(“%+v”, n.Name())`. I’ve tried to dump all fields for n.Name()
> <https://pkg.go.dev/cmd/compile/internal/ir#Name> but still cannot see
> “itoa.go…”.
>
> Any thoughts on how to get this substring or what's the actual step of
> converting `n.Name()` into the output string?
>
> Thanks in advance!
>
> Best,
>
> Chris
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/92613ee9-3c7d-4a1a-ac1e-626712a3d924n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/92613ee9-3c7d-4a1a-ac1e-626712a3d924n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9c4KgqUOw880HaqRqS4_8ZAPnKoGWq9zRY%2B3496aoLOQ%40mail.gmail.com.

Reply via email to