Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: antony.king@st.com (Antony KING)
Cc: gdb@sourceware.org
Subject: Re: Spurious SIGTRAP reported by GDB 6.8 when debugging embedded  RTOS  application
Date: Tue, 19 Aug 2008 00:33:00 -0000	[thread overview]
Message-ID: <200808181815.m7IIFNSo006641@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <48A9B65A.1020307@st.com> from "Antony KING" at Aug 18, 2008 06:50:18 PM

Anthony King wrote:

> I have checked the implementation and GDB is calling my target_resume
> with a ptid of -1 (resume all threads), which I believe is the expected
> argument (since scheduler locking is not supported). However I think I
> will add an error check in my target_resume just in case GDB requests a
> single thread to be resumed.

Note that even if target_resume is called with a ptid of -1 to resume
all threads, if the "step" flag is on, GDB will still expect that just
one thread receives the single-step flag.  This thread is implictly
identified by the current value of the inferior_ptid global variable.

So basically target_resume is supposed to provide these modes:

(1) ptid == -1  --  step == 0
    resume all threads, no hardware single-step
(2) ptid != -1  --  step == 0
    resume only selected thread, no hardware single-step
(3) ptid == -1  --  step == 1
    resume all threads, hardware single-step inferior_ptid thread
(4) ptid != -1  --  step == 1
    resume only selected thread, hardware single-step that thread

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2008-08-18 18:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16 15:12 Antony KING
2008-08-16 15:33 ` Ulrich Weigand
2008-08-18 18:16   ` Antony KING
2008-08-18 18:30     ` Daniel Jacobowitz
2008-08-18 18:36       ` Pedro Alves
2008-08-20  1:31         ` Antony KING
2008-08-18 18:47       ` Antony KING
2008-08-19  0:33         ` Ulrich Weigand [this message]
2008-08-20 14:30           ` Antony KING
2008-08-20 14:37             ` Pedro Alves
2008-08-21  3:24               ` Antony KING
2008-08-22 14:58                 ` Ulrich Weigand
2008-08-27 21:38                   ` Antony KING

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=200808181815.m7IIFNSo006641@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=antony.king@st.com \
    --cc=gdb@sourceware.org \
    /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