This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wrong assumptions about pthread_t being numeric


On 09/17/2011 05:43 PM, John Spencer wrote:
On 09/17/2011 04:28 AM, Joel Brobecker wrote:
i disagree. adding a proper solution once is superior to creating
dozens of special case hacks.  also it saves a lot of time in the long
term.
Based on my experience so far, I have to agree with Pedro.
But if you do have a superior solution, we'll take a look.
I still have to tell you that I won't like it if your solution
makes the code harder to read. Sometimes, that's OK because it
helps achieving portability.  But when there is no such need for
portability, it just gets in the way. Let's also be pragmatic,
here and fix the problems that we know we have.

it would be nice to have an approach which would just work anywhere and respect the spec,
however i currently have not the resources to implement it.


thus, as you suggested, i came up with a small patch fixing the issue at hand. the solution should work on any sys/libc combination where sizeof(long) == sizeof(void*) and pthread_t is either a pointer or an int with sizeof equal or less than sizeof long.
this should cover all currently existing combinations.


i may find more spots in the future which need the application of the macro, and will eventually be sending more patches applying the conversion macro to it.

-- JS



knock, knock. anybody here ? please tell me wether you accept my patch or not.

-- JS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]