go/gdb-printer.patch
Sascha Peilicke 36925d7003 Accepting request 86878 from home:andtecheu:go
- Update to r60.2 (fix memory leak in map types)
- Install gdb pretty printer and functions for additional native go support
- Patch linker to emit location of gdb helper

OBS-URL: https://build.opensuse.org/request/show/86878
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=89
2011-10-06 11:06:36 +00:00

21 lines
597 B
Diff

diff -r fd30c132d1bd src/cmd/ld/dwarf.c
--- a/src/cmd/ld/dwarf.c Mon Sep 19 12:32:07 2011 +1000
+++ b/src/cmd/ld/dwarf.c Wed Oct 05 16:30:58 2011 +0200
@@ -1602,10 +1602,16 @@
for (i = 1; i < histfilesize; i++) {
if ((c = strstr(histfile[i], "runtime/runtime_defs.go")) != nil) {
+#ifndef GDB_PRINTER
l = c - histfile[i];
memmove(gdbscript, histfile[i], l);
memmove(gdbscript + l, "runtime/runtime-gdb.py", strlen("runtime/runtime-gdb.py") + 1);
break;
+#endif
+#ifdef GDB_PRINTER
+ memmove(gdbscript, GDB_PRINTER, strlen(GDB_PRINTER) + 1);
+ break;
+#endif
}
}
}