This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [BUG/discussion] set scheduler-locking on get internal-error(maybe about multi-inferior)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: Hui Zhu <teawater at gmail dot com>
- Date: Tue, 20 Oct 2009 11:02:14 +0100
- Subject: Re: [BUG/discussion] set scheduler-locking on get internal-error(maybe about multi-inferior)
- References: <daef60380910200056q69e7b8f8v817b2f743d4c77cd@mail.gmail.com>
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