1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

devel/delve: Update to 1.6.1

Also added https://github.com/go-delve/delve/pull/2511

PR:		256330
This commit is contained in:
Dmitry Wagin 2021-06-01 22:48:01 +08:00 committed by Li-Wen Hsu
parent 51990d4005
commit 6a5c6710db
No known key found for this signature in database
GPG Key ID: 8D7BCC7D012FD37E
4 changed files with 66 additions and 4 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= delve
DISTVERSIONPREFIX= v
DISTVERSION= 1.6.0
DISTVERSION= 1.6.1
CATEGORIES= devel
MAINTAINER= dmitry.wagin@ya.ru

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1612113058
SHA256 (go-delve-delve-v1.6.0_GH0.tar.gz) = a10a6fc40d87572c6d3f3becdb1a289269e17526d038749f2fa04dd9f591f26a
SIZE (go-delve-delve-v1.6.0_GH0.tar.gz) = 7629850
TIMESTAMP = 1622023017
SHA256 (go-delve-delve-v1.6.1_GH0.tar.gz) = e73f7fc063632268d3bdf53486aeafd98cceb8f86f4af56903dedfebaefe690d
SIZE (go-delve-delve-v1.6.1_GH0.tar.gz) = 7686466

View File

@ -0,0 +1,52 @@
--- pkg/proc/native/proc_freebsd.c.orig 2021-05-19 07:24:05 UTC
+++ pkg/proc/native/proc_freebsd.c
@@ -3,11 +3,13 @@
#include <sys/queue.h>
#include <sys/sysctl.h>
#include <sys/user.h>
+#include <sys/types.h>
#include <libprocstat.h>
#include <libutil.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>
#include "proc_freebsd.h"
@@ -66,21 +68,23 @@ int find_status(int pid){
return (status);
}
-int get_entry_point(int pid) {
+uintptr_t get_entry_point(int pid) {
void *ep = NULL;
+ errno = EINVAL;
+
struct procstat *ps = procstat_open_sysctl();
if (ps == NULL)
- return -1;
+ return 0;
uint cnt = 0;
struct kinfo_proc *kipp = procstat_getprocs(ps, KERN_PROC_PID, pid, &cnt);
if (cnt == 0)
- return -1;
+ return 0;
Elf_Auxinfo *auxv = procstat_getauxv(ps, kipp, &cnt);
if (auxv == NULL)
- return -1;
+ return 0;
for (int i = 0; i < cnt; i++) {
if (auxv[i].a_type == AT_ENTRY) {
@@ -89,5 +93,6 @@ int get_entry_point(int pid) {
}
}
procstat_freeauxv(ps, auxv);
- return (int)ep;
+ errno = 0;
+ return (uintptr_t)ep;
}

View File

@ -0,0 +1,10 @@
--- pkg/proc/native/proc_freebsd.h.orig 2021-05-19 07:24:05 UTC
+++ pkg/proc/native/proc_freebsd.h
@@ -1,4 +1,6 @@
+#include <sys/types.h>
+
char * find_command_name(int pid);
char * find_executable(int pid);
int find_status(int pid);
-int get_entry_point(int pid);
+uintptr_t get_entry_point(int pid);