This is the mail archive of the gdb-patches@sources.redhat.com 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: [patch] gdbserver fails on 32-bit ppc rfs running in a-64 bit 2.6 linux kernel


On Thu, Mar 24, 2005 at 07:06:02PM +0530, Jitendra Pawar wrote:
> > 
> > > Understood thanks. I believe that changing type of thread IDs to 'long
> > > long' in gdbserver code will work. In that case I need to update all
> > > places as you did it for changing type of thread IDs to 'unsigned long'
> > > few days back. Is it the fix for this?
> > 
> > Why don't you explain exactly what you think is the problem, and
> > exactly why you need to double the size of thread IDs to fix it?
> > 
> 
> Sorry It was my mistake, I wanted to say 'long int' instead of 'long
> long '.  and size of long int and unsigned int is same i.e. 64-bit.
> 
> You have commited the patch named 'Support large thread IDs in
> gdbserver' at the beginning of this month. In this commit you changed
> the type of thread ID to unsigned int. One of the use of This commit is
> to support for 64-bit hosts and maintain consistency. The variable
> cont_thread is also declared as 'unsigned int' and 'cont_thread = -1'
> statement is still in the place. 
> 
> Now please see the Amit's comments:
> > > > > > > > > >> You have changed the data type of thread_resume::thread as well as cont_thread 
> > > > > > > > > >> to unsigned long. "cont_thread = -1" and "(cont_thread > 0)" are still in 
> > > > > > > > > >> place. How does this work?
> 
> So believe that changing data type of thread IDs to 'long int' will be
> the fix for this.

The patch fixed problems on 32-bit systems, where int and long are the
same size, by changing int to unsigned long.  It should be clear from
that explanation that changing to signed long won't fix the problem;
it will re-break NPTL.

I'll look at it soon.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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