runtime: export PCDATA value reader
This interface is required to use the PCDATA interface
implemented in Go 1.2. While initially entirely private, the
FUNCDATA side of the interface has been made public. This
change completes the FUNCDATA/PCDATA interface.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13735043
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 920e86c..66e87d5 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -802,6 +802,7 @@
int32 runtime·funcarglen(Func*, uintptr);
int32 runtime·funcspdelta(Func*, uintptr);
int8* runtime·funcname(Func*);
+int32 runtime·pcdatavalue(Func*, int32, uintptr);
void* runtime·stackalloc(uint32);
void runtime·stackfree(void*, uintptr);
MCache* runtime·allocmcache(void);
diff --git a/src/pkg/runtime/symtab.c b/src/pkg/runtime/symtab.c
index bdf96a1..dd0015a 100644
--- a/src/pkg/runtime/symtab.c
+++ b/src/pkg/runtime/symtab.c
@@ -208,8 +208,8 @@
return x;
}
-static int32
-pcdatavalue(Func *f, int32 table, uintptr targetpc)
+int32
+runtime·pcdatavalue(Func *f, int32 table, uintptr targetpc)
{
if(table < 0 || table >= f->npcdata)
return -1;
@@ -221,7 +221,7 @@
{
if(targetpc == f->entry)
return 0;
- return pcdatavalue(f, PCDATA_ArgSize, targetpc-PCQuantum);
+ return runtime·pcdatavalue(f, PCDATA_ArgSize, targetpc-PCQuantum);
}
void