Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Manoj Iyer <manjo@austin.ibm.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: gilliam@us.ibm.com, gdb-patches@sources.redhat.com
Subject: Re: [RFC] New thread testcase.
Date: Tue, 10 Aug 2004 20:44:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.58.0408101503500.30104@lazy> (raw)
In-Reply-To: <411930DF.30401@gnu.org>


oh! sorry abt that... got confused btwn 'bugs'...

The kernel bug was causing gdb to fail when passing a 32bit address to the
kernel.  this was causing 32 bit gdb to fail in linux_test_for_tracefork()
by always returning second_pid = 0 in the PTRACE_GETEVENTMSG call.

this resulted in linux_enable_event_reporting() not setting the PTRACE
fork options for the pid and then the thread never received a SIGSTOP.

John Engel, kernel developer, debugged and fixed this problem in the
kernel after we reported this GDB problem to him...

So, when you debug a multi-threaded app with 32bit GDB on a PPC64 system,
and you set a break point at the thread function and tried to step, you
get the message "reading register pc (#64): No such process." for example:

Breakpoint 1, main (argc=1, argv=0xffffe464) at tbug.c:31
31        for (n = 0; n < N; ++n)
(gdb) cont
Continuing.
[New Thread 1078217504 (LWP 26708)]
tf(0): begin
[New Thread 1082411808 (LWP 26709)]
after create
tf(1): begin
tf(0): end
[Thread 1078217504 (LWP 26708) exited]
tf(1): end
[Thread 1082411808 (LWP 26709) exited]
after join

Program exited normally.
(gdb) clear main
Deleted breakpoint 1
(gdb) break tf
Breakpoint 2 at 0x10000594: file tbug.c, line 15.
(gdb) run
Starting program: /home/public/test-tools/gdb/tbug
[Thread debugging using libthread_db enabled]
[New Thread 1074020384 (LWP 26710)]
reading register pc (#64): No such process.
(gdb) cont
Continuing.
reading register pc (#64): No such process.

Thanks
----- ----
Manoj Iyer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On Tue, 10 Aug 2004, Andrew Cagney wrote:

> >>Manoj,
> >>>
> >>> You've got me curious.  Do any of the existing tests exercise this bug
> >>> (manythreads.exp comes to mind)?   Oh, and what is the bug? :-)
> >>>
> >
> >
> > This is a generic kernel bug (in ptrace() )that causes ptrace to fail on
> > Power 64 systems.  Please look at PR#1712 for details.
>
> Unfortunatly 1712 doesn't answer my question.  What is the bug?  What
> causes ptrace to fail?
>
> Andrew
>
>
>


  reply	other threads:[~2004-08-10 20:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 22:18 [patch/testsuite/mi/copyright] gdb.mi/mi2-*.exp: update copyright years Michael Chastain
2004-08-10  6:10 ` [RFC] New thread testcase Manoj Iyer
2004-08-10  7:24   ` Michael Chastain
2004-08-10 15:13     ` Andrew Cagney
2004-08-10 20:22       ` Manoj Iyer
2004-08-10 20:33         ` Andrew Cagney
2004-08-10 20:44           ` Manoj Iyer [this message]
2004-08-12 16:04             ` Andrew Cagney
2004-08-27  3:25             ` Michael Snyder
2004-08-27 13:48               ` Manoj Iyer
2004-08-10 20:13     ` Manoj Iyer
2004-08-12  0:26   ` Michael Snyder

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=Pine.LNX.4.58.0408101503500.30104@lazy \
    --to=manjo@austin.ibm.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gilliam@us.ibm.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