From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Hui Zhu <teawater@gmail.com>
Subject: Re: [BUG/discussion] set scheduler-locking on get internal-error(maybe about multi-inferior)
Date: Tue, 20 Oct 2009 15:31:00 -0000 [thread overview]
Message-ID: <200910201102.18781.pedro@codesourcery.com> (raw)
In-Reply-To: <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
prev parent reply other threads:[~2009-10-20 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 8:20 Hui Zhu
2009-10-20 15:31 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910201102.18781.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox