* [PR PATCH] radare2: update to 4.0.0.
@ 2019-10-31 22:19 voidlinux-github
2019-10-31 23:19 ` [PR PATCH] [Merged]: " voidlinux-github
0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-10-31 22:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
There is a new pull request by jnbr against master on the void-packages repository
https://github.com/jnbr/void-packages radare2
https://github.com/void-linux/void-packages/pull/16012
radare2: update to 4.0.0.
A patch file from https://github.com/void-linux/void-packages/pull/16012.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-radare2-16012.patch --]
[-- Type: text/x-diff, Size: 8277 bytes --]
From b02e06c98f10939e903fc6aa4c52fbbbb8359224 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Thu, 31 Oct 2019 22:14:51 +0100
Subject: [PATCH 1/2] radare2: update to 4.0.0.
---
srcpkgs/radare2/patches/01_i686-fix.patch | 117 ++++++++++++++++++++++
srcpkgs/radare2/patches/02_i686-fix.patch | 27 +++++
srcpkgs/radare2/template | 4 +-
3 files changed, 146 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/radare2/patches/01_i686-fix.patch
create mode 100644 srcpkgs/radare2/patches/02_i686-fix.patch
diff --git a/srcpkgs/radare2/patches/01_i686-fix.patch b/srcpkgs/radare2/patches/01_i686-fix.patch
new file mode 100644
index 00000000000..4dbe34d847b
--- /dev/null
+++ b/srcpkgs/radare2/patches/01_i686-fix.patch
@@ -0,0 +1,117 @@
+From f639c3b6a17a57c9a0fa1790811eff27dd124b59 Mon Sep 17 00:00:00 2001
+From: radare <pancake@nopcode.org>
+Date: Wed, 30 Oct 2019 13:04:25 +0100
+Subject: [PATCH] Fix build for 32bit Linux systems ##build (#15384)
+
+---
+ libr/debug/p/native/linux/linux_debug.c | 88 ++++++++++++-------------
+ 1 file changed, 43 insertions(+), 45 deletions(-)
+
+diff --git a/libr/debug/p/native/linux/linux_debug.c b/libr/debug/p/native/linux/linux_debug.c
+index ebdac31873..be131eb16f 100644
+--- libr/debug/p/native/linux/linux_debug.c
++++ libr/debug/p/native/linux/linux_debug.c
+@@ -716,11 +716,10 @@ RList *linux_thread_list(int pid, RList *list) {
+ r_cons_printf ("foo = 0x%04lx \n", (fpregs).foo);\
+ r_cons_printf ("fos = 0x%04lx ", (fpregs).fos)
+
+-void print_fpu (void *f){
+-#if __x86_64__ || __i386__
++static void print_fpu(void *f){
++#if __x86_64__
+ int i,j;
+ struct user_fpregs_struct fpregs = *(struct user_fpregs_struct *)f;
+-#if __x86_64__
+ #if __ANDROID__
+ PRINT_FPU (fpregs);
+ for (i = 0;i < 8; i++) {
+@@ -761,48 +760,47 @@ void print_fpu (void *f){
+ }
+ #endif // __ANDROID__
+ #elif __i386__
+- if (!r) {
+-#if !__ANDROID__
+- struct user_fpxregs_struct fpxregs = *(struct user_fpxregs_struct*)f;
+- r_cons_printf ("---- x86-32 ----\n");
+- r_cons_printf ("cwd = 0x%04x ; control ", fpxregs.cwd);
+- r_cons_printf ("swd = 0x%04x ; status\n", fpxregs.swd);
+- r_cons_printf ("twd = 0x%04x ", fpxregs.twd);
+- r_cons_printf ("fop = 0x%04x\n", fpxregs.fop);
+- r_cons_printf ("fip = 0x%08x\n", (ut32)fpxregs.fip);
+- r_cons_printf ("fcs = 0x%08x\n", (ut32)fpxregs.fcs);
+- r_cons_printf ("foo = 0x%08x\n", (ut32)fpxregs.foo);
+- r_cons_printf ("fos = 0x%08x\n", (ut32)fpxregs.fos);
+- r_cons_printf ("mxcsr = 0x%08x\n", (ut32)fpxregs.mxcsr);
+- for(i = 0; i < 8; i++) {
+- ut32 *a = (ut32*)(&fpxregs.xmm_space);
+- ut64 *b = (ut64 *)(&fpxregs.st_space[i * 4]);
+- ut32 *c = (ut32*)&fpxregs.st_space;
+- float *f = (float *)&fpxregs.st_space;
+- a = a + (i * 4);
+- c = c + (i * 4);
+- f = f + (i * 4);
+- r_cons_printf ("xmm%d = %08x %08x %08x %08x ", i, (int)a[0],
+- (int)a[1], (int)a[2], (int)a[3] );
+- r_cons_printf ("st%d = %0.3lg (0x%016"PFMT64x") | %0.3f (0x%08x) | "\
+- "%0.3f (0x%08x)\n", i,
+- (double)*((double*)(&fpxregs.st_space[i*4])), b[0],
+- f[0], c[0], f[1], c[1]);
+- }
+-#endif // !__ANDROID__
+- } else {
+- r_cons_printf ("---- x86-32-noxmm ----\n");
+- PRINT_FPU_NOXMM (fpregs);
+- for(i = 0; i < 8; i++) {
+- ut64 *b = (ut64 *)(&fpregs.st_space[i*4]);
+- double *d = (double*)b;
+- ut32 *c = (ut32*)&fpregs.st_space;
+- float *f = (float *)&fpregs.st_space;
+- c = c + (i * 4);
+- f = f + (i * 4);
+- r_cons_printf ("st%d = %0.3lg (0x%016"PFMT64x") | %0.3f (0x%08x) | "\
+- "%0.3f (0x%08x)\n", i, d[0], b[0], f[0], c[0], f[1], c[1]);
+- }
++ int i,j;
++#if __ANDROID__
++ struct user_fpxregs_struct fpxregs = *(struct user_fpxregs_struct*)f;
++ r_cons_printf ("---- x86-32 ----\n");
++ r_cons_printf ("cwd = 0x%04x ; control ", fpxregs.cwd);
++ r_cons_printf ("swd = 0x%04x ; status\n", fpxregs.swd);
++ r_cons_printf ("twd = 0x%04x ", fpxregs.twd);
++ r_cons_printf ("fop = 0x%04x\n", fpxregs.fop);
++ r_cons_printf ("fip = 0x%08x\n", (ut32)fpxregs.fip);
++ r_cons_printf ("fcs = 0x%08x\n", (ut32)fpxregs.fcs);
++ r_cons_printf ("foo = 0x%08x\n", (ut32)fpxregs.foo);
++ r_cons_printf ("fos = 0x%08x\n", (ut32)fpxregs.fos);
++ r_cons_printf ("mxcsr = 0x%08x\n", (ut32)fpxregs.mxcsr);
++ for(i = 0; i < 8; i++) {
++ ut32 *a = (ut32*)(&fpxregs.xmm_space);
++ ut64 *b = (ut64 *)(&fpxregs.st_space[i * 4]);
++ ut32 *c = (ut32*)&fpxregs.st_space;
++ float *f = (float *)&fpxregs.st_space;
++ a = a + (i * 4);
++ c = c + (i * 4);
++ f = f + (i * 4);
++ r_cons_printf ("xmm%d = %08x %08x %08x %08x ", i, (int)a[0],
++ (int)a[1], (int)a[2], (int)a[3] );
++ r_cons_printf ("st%d = %0.3lg (0x%016"PFMT64x") | %0.3f (0x%08x) | "\
++ "%0.3f (0x%08x)\n", i,
++ (double)*((double*)(&fpxregs.st_space[i*4])), b[0],
++ f[0], c[0], f[1], c[1]);
++ }
++#else
++ struct user_fpregs_struct fpregs = *(struct user_fpregs_struct *)f;
++ r_cons_printf ("---- x86-32-noxmm ----\n");
++ PRINT_FPU_NOXMM (fpregs);
++ for(i = 0; i < 8; i++) {
++ ut64 *b = (ut64 *)(&fpregs.st_space[i*4]);
++ double *d = (double*)b;
++ ut32 *c = (ut32*)&fpregs.st_space;
++ float *f = (float *)&fpregs.st_space;
++ c = c + (i * 4);
++ f = f + (i * 4);
++ r_cons_printf ("st%d = %0.3lg (0x%016"PFMT64x") | %0.3f (0x%08x) | "\
++ "%0.3f (0x%08x)\n", i, d[0], b[0], f[0], c[0], f[1], c[1]);
+ }
+ #endif
+ #else
diff --git a/srcpkgs/radare2/patches/02_i686-fix.patch b/srcpkgs/radare2/patches/02_i686-fix.patch
new file mode 100644
index 00000000000..680439df9d3
--- /dev/null
+++ b/srcpkgs/radare2/patches/02_i686-fix.patch
@@ -0,0 +1,27 @@
+--- libr/debug/p/native/linux/linux_debug.c.orig 2019-10-31 21:39:54.233871286 +0100
++++ libr/debug/p/native/linux/linux_debug.c 2019-10-31 21:40:30.488558728 +0100
+@@ -874,13 +874,13 @@
+ struct user_fpxregs_struct fpxregs;
+ ret1 = r_debug_ptrace (dbg, PTRACE_GETFPXREGS, pid, NULL, &fpxregs);
+ if (ret1 == 0) {
+- if (showfpu) print_fpu ((void *)&fpxregs, ret1);
++ if (showfpu) print_fpu ((void *)&fpxregs);
+ if (sizeof(fpxregs) < size) size = sizeof(fpxregs);
+ memcpy (buf, &fpxregs, size);
+ return sizeof(fpxregs);
+ } else {
+ ret1 = r_debug_ptrace (dbg, PTRACE_GETFPREGS, pid, NULL, &fpregs);
+- if (showfpu) print_fpu ((void *)&fpregs, ret1);
++ if (showfpu) print_fpu ((void *)&fpregs);
+ if (ret1 != 0) return false;
+ if (sizeof(fpregs) < size) size = sizeof(fpregs);
+ memcpy (buf, &fpregs, size);
+@@ -888,7 +888,7 @@
+ }
+ #else
+ ret1 = r_debug_ptrace (dbg, PTRACE_GETFPREGS, pid, NULL, &fpregs);
+- if (showfpu) print_fpu ((void *)&fpregs, 1);
++ if (showfpu) print_fpu ((void *)&fpregs);
+ if (ret1 != 0) return false;
+ if (sizeof (fpregs) < size) size = sizeof(fpregs);
+ memcpy (buf, &fpregs, size);
diff --git a/srcpkgs/radare2/template b/srcpkgs/radare2/template
index a1210480750..2d3e19ce189 100644
--- a/srcpkgs/radare2/template
+++ b/srcpkgs/radare2/template
@@ -1,7 +1,7 @@
# Template file for 'radare2'
# cutter needs to be bumped when radare2 is updated
pkgname=radare2
-version=3.9.0
+version=4.0.0
revision=1
build_style=gnu-configure
configure_args="--with-syscapstone"
@@ -12,4 +12,4 @@ maintainer="Johannes <johannes.brechtmann@gmail.com>"
license="LGPL-3.0-only"
homepage="http://www.radare.org"
distfiles="https://github.com/radare/radare2/archive/${version}.tar.gz"
-checksum=270cf67d0dee8dab4ed21dfaab57671b479ec82f0fc8d1c988e121c48b51addc
+checksum=7621e38558917dc4b469acf2aa33d7cab6414420a0a1d205c55b9c96423e9cee
From 4846e3a270104e60580e1879a5f5d7e64bd994fa Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Thu, 31 Oct 2019 22:15:18 +0100
Subject: [PATCH 2/2] cutter: rebuild for radare2-4.0.0
---
srcpkgs/cutter/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/cutter/template b/srcpkgs/cutter/template
index aa4c57ef4ad..c6a8687266f 100644
--- a/srcpkgs/cutter/template
+++ b/srcpkgs/cutter/template
@@ -1,7 +1,7 @@
# Template file for 'cutter'
pkgname=cutter
version=1.9.0
-revision=3
+revision=4
build_wrksrc=src
build_style=qmake
hostmakedepends="pkg-config qt5-declarative-devel qt5-location-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Merged]: radare2: update to 4.0.0.
2019-10-31 22:19 [PR PATCH] radare2: update to 4.0.0 voidlinux-github
@ 2019-10-31 23:19 ` voidlinux-github
0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-10-31 23:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
There's a merged pull request on the void-packages repository
radare2: update to 4.0.0.
https://github.com/void-linux/void-packages/pull/16012
Description:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-31 23:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 22:19 [PR PATCH] radare2: update to 4.0.0 voidlinux-github
2019-10-31 23:19 ` [PR PATCH] [Merged]: " voidlinux-github
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).