On Thursday, July 8, 2021 at 11:45:19 PM UTC-4 Ian Lance Taylor wrote:

> On Thu, Jul 8, 2021 at 8:41 PM 董⼀峰 <dongyif...@bytedance.com> wrote: 
> > 
> > Thanks for replying. 
> > So golang only supports debugging optimized golang runtime? 
>
> Well, Go requires that the runtime package be built with optimization 
> (when using the gc compiler, which is the default). So, yes, when 
> running runtime code under the debugger you will be looking at 
> optimized code. 
>

Is this just to keep people from accidentally making a slow version of the 
runtime, or is there an actual technical reason why it would not work?  If 
the check were removed 
(https://github.com/golang/go/blob/ef57834360cf69f2e8b52b32c7a05d96bf6bbba7/src/cmd/compile/internal/base/flag.go#L226)
 
is there any reason to believe that the runtime would not function 
correctly (albeit slowly)? 

-- 
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/37425499-16b7-4569-bad9-55fd45c1bff6n%40googlegroups.com.

Reply via email to