Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Petr Machata
Mark Wielaard writes: > On Wed, 2014-04-23 at 22:29 +0200, Petr Machata wrote: >> How's this for a counter-proposal? I shamelessly reused your commit >> message and ChangeLog wording, please let me know if that's overstepping >> boundaries. > > No it isn't. And thanks for the proposal. > But I t

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Mark Wielaard
On Wed, 2014-04-23 at 22:29 +0200, Petr Machata wrote: > How's this for a counter-proposal? I shamelessly reused your commit > message and ChangeLog wording, please let me know if that's overstepping > boundaries. No it isn't. And thanks for the proposal. But I think I prefer the fix using multip

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Petr Machata
How's this for a counter-proposal? I shamelessly reused your commit message and ChangeLog wording, please let me know if that's overstepping boundaries. Thanks, PM >From 2ed5c470803d15c960a9a2574dc572ac1aa92b71 Mon Sep 17 00:00:00 2001 Message-Id: <2ed5c470803d15c960a9a2574dc572ac1aa92b71.13982

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Josh Stone
On 04/23/2014 11:51 AM, Richard Henderson wrote: > On 04/23/2014 11:32 AM, Petr Machata wrote: >> Richard Henderson writes: >> >>> On 04/23/2014 03:17 AM, Petr Machata wrote: Wouldn't something like this get us off the hook as well? - (var) |= (typeof (var)) __s.i << ((nth) * 7);

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Richard Henderson
On 04/23/2014 11:32 AM, Petr Machata wrote: > Richard Henderson writes: > >> On 04/23/2014 03:17 AM, Petr Machata wrote: >>> Wouldn't something like this get us off the hook as well? >>> >>> - (var) |= (typeof (var)) __s.i << ((nth) * 7); \ >>> + (var) |= (typeof (var)

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Petr Machata
Richard Henderson writes: > On 04/23/2014 03:17 AM, Petr Machata wrote: >> Wouldn't something like this get us off the hook as well? >> >> -(var) |= (typeof (var)) __s.i << ((nth) * 7); \ >> +(var) |= (typeof (var)) \

Re: linux-pid-attach.c on non-Linux hosts

2014-04-23 Thread Mark Wielaard
On Wed, 2014-04-23 at 18:12 +0200, Kurt Roeckx wrote: > On Wed, Apr 23, 2014 at 11:46:53AM +0200, Mark Wielaard wrote: > > Aha. I think this is because you are using a /bin/sh that isn't bash and > > has a 'test' that doesn't recognize '==' as string comparison. It should > > use a single '='. Does

Re: linux-pid-attach.c on non-Linux hosts

2014-04-23 Thread Kurt Roeckx
On Wed, Apr 23, 2014 at 11:46:53AM +0200, Mark Wielaard wrote: > > > > PS: run-nm-self.sh fails for me for current master. > > > > > > How does it fail? Do you have a tests/run-nm-self.sh.log? Which arch? > > > > File is attached. This is on x86_64. > > Aha. I think this is because you are usin

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Richard Henderson
On 04/23/2014 03:17 AM, Petr Machata wrote: > Wouldn't something like this get us off the hook as well? > > - (var) |= (typeof (var)) __s.i << ((nth) * 7); \ > + (var) |= (typeof (var)) \ > + (((uint64_t) (typeof (

Re: [PATCH v3 3/6] libdwelf: Add dwelf_dwarf_gnu_debugaltlink

2014-04-23 Thread Mark Wielaard
On Tue, 2014-04-22 at 09:33 +0200, Florian Weimer wrote: > On 04/18/2014 01:02 PM, Mark Wielaard wrote: > > On Tue, 2014-04-15 at 14:49 +0200, Florian Weimer wrote: > >> +2014-04-15 Florian Weimer > >> + > >> + * dwelf_dwarf_gnu_debugaltlink.c: New file. > >> + * Makefile.am (libdwelf_a_SOURCE

Re: [PATCH v3 2/6] libdw: Add dwarf_getalt, dwarf_setalt

2014-04-23 Thread Mark Wielaard
On Tue, 2014-04-22 at 09:26 +0200, Florian Weimer wrote: > > Could you post an updated patch with that documentation change. The code > > is fine, so I want to add it to my branch now. > > Here's the patch. Thanks. Rebased mjw/dwelf to master and added this patch. Thanks, Mark

Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

2014-04-23 Thread Petr Machata
Mark Wielaard writes: > Sadly the neat trick triggers undefined behavior since we are trying to > left shift a negative value. Even though it appears to work currently I > am slightly afraid a compiler optimization might take advantage of this > in the future (since it is undefined behavior it co

Re: linux-pid-attach.c on non-Linux hosts

2014-04-23 Thread Mark Wielaard
On Wed, 2014-04-23 at 00:54 +0200, Kurt Roeckx wrote: > On Wed, Apr 23, 2014 at 12:26:53AM +0200, Mark Wielaard wrote: > > On Tue, 2014-04-22 at 21:52 +0200, Kurt Roeckx wrote: > > > The attached patch seems to be working for me on kFreeBSD. > > > > Looks reasonable to me. The other arch backends