This is the mail archive of the gdb@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: [BUG/discussion] set scheduler-locking on get internal-error(maybe about multi-inferior)


On Tuesday 20 October 2009 08:56:08, Hui Zhu wrote:
> Hi guys,
> 
> I got some error with multi-thread and low arch-linux-nat.  I
> reproduced it in i386-linux, I am not sure it affect other arch or
> not.

Thanks.

> (gdb) set scheduler-locking on
> (gdb) si
> ../../src/gdb/target.c:2567: internal-error: Can't determine the
> current address space of thread process 16277

> The bug issue is:
> In linux-nat.c:linux_nat_resume
>   /* Convert to something the lower layer understands.  */
>   ptid = pid_to_ptid (GET_LWP (lp->ptid));
> 
> 
> In i386-linux-nat.c:i386_linux_resume
> int pid = PIDGET (ptid);
> struct regcache *regcache = get_thread_regcache (pid_to_ptid (pid));
> 
> The pid in i386_linux_resume is lwp, get_thread_regcache will not get
> the right ptid.

Right.

> 
> I don't have any good idea with this bug.  There is too much "int pid
> = PIDGET (ptid);" In arch-linux-nat function.   I am not sure it can
> really work well with multi-inferior.  This level code looks don't
> have good way if the ptid is get from " ptid = pid_to_ptid (GET_LWP
> (lp->ptid));".

I'm testing a patch.

-- 
Pedro Alves


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