Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Antony KING <antony.king@st.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb@sourceware.org, Daniel Jacobowitz <drow@false.org>,
		Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: Spurious SIGTRAP reported by GDB 6.8 when debugging embedded   RTOS  application
Date: Wed, 20 Aug 2008 01:31:00 -0000	[thread overview]
Message-ID: <48A9BE80.9080306@st.com> (raw)
In-Reply-To: <200808181416.47444.pedro@codesourcery.com>

This change in behaviour looks like it has occurred as a result of some
structural changes in infrun.c. After a quick scan I can see numerous
(related I think) changes which are possible candidates for this
behavioural change, and all in the area of single stepping :-).

It looks like that these changes have been made in order to improve the
expected behaviour of GDB when debugging multi-threaded applications;
unfortunately while this is OK for debugging user processes on OS's such
as Linux it does not fit nicely onto my RTOS :-(.

I suspect that your explanation about the behaviour of "next" when the
target stopped due to a breakpoint may be implicated in this change :-).

I do not know what the "right" solution in general is, but for my RTOS I
think the only recourse is to ensure that the last stopped thread is
selected before performing a step operation.

Cheers,

Antony.

Pedro Alves wrote:
> On Monday 18 August 2008 13:42:05, Daniel Jacobowitz wrote:
>> On Mon, Aug 18, 2008 at 11:20:23AM +0100, Antony KING wrote:
>>> Thanks for the explanation. Unfortunately GDB has no influence over the
>>> RTOS, it is merely an observer. This means that it cannot change the
>>> status of threads or decide which thread is to execute; this is solely
>>> under the control of the RTOS.
> 
> What is confusing me a bit, is that you claim that this is a new
> behaviour in 6.8, coming from 6.7.1.  What was it that changed between
> 6.7.1 and 6.8?  That is, why did it work in 6.7.1 ?
> 
> Note that if the user switches threads when stopped at a breakpoint, and
> the user issues "next", gdb will first revert back to the thread that
> hit the breakpoint originally, do a single-step to get over the breakpoint,
> and then when that finishes, reverts back to the new thread the user had
> selected, to proceed with the "next" command.


  reply	other threads:[~2008-08-18 18:30 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 [this message]
2008-08-18 18:47       ` Antony KING
2008-08-19  0:33         ` Ulrich Weigand
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=48A9BE80.9080306@st.com \
    --to=antony.king@st.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=uweigand@de.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