
Support multiple file / directory tables for multiple compilation units. - added a type DebugLines that can hold number of DebugLineInfo - added a supporting attribute to DebugLineInfo called 'Lookup' which is to be used to quickly lookup if file exists in FileNames slice - added supporting methods to lookup and return corresponding DebugLineInfo - changed the debug_line parsing behavior to read all the available tables and push them to DebugLines - since Process.lineInfo is now a slice, it was breaking AllPCsBetween as well - updated that function's definition to accept a new filename parameter to be able to extract related DebugLineInfo - updated calls to AllPCsBetween - fixed tests that were broken due to attribute type change in Process - updated _fixtures/cgotest program to include stdio.h, so that it updates .debug_line header - added a test to check 'next' in a cgo binary - OSX - 1.4 does not support cgo, handle that in new testcase
16 lines
214 B
Go
16 lines
214 B
Go
package main
|
|
|
|
/*
|
|
#include <stdio.h>
|
|
char* foo(void) { return "hello, world!"; }
|
|
*/
|
|
import "C"
|
|
|
|
import "fmt"
|
|
import "runtime"
|
|
|
|
func main() {
|
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
|
fmt.Println(C.GoString(C.foo()))
|
|
}
|