Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: Re: [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace
Date: Mon, 01 Apr 2019 16:32:00 -0000	[thread overview]
Message-ID: <20190401093248.615b2c5c@f29-4.lan> (raw)
In-Reply-To: <20190330095831.5616-1-philippe.waroquiers@skynet.be>

On Sat, 30 Mar 2019 10:58:31 +0100
Philippe Waroquiers <philippe.waroquiers@skynet.be> wrote:

> The test  gdb.threads/watchthreads-reorder.exp verifies that the
> 'set debug infrun 1' debug output does not crash GDB.
> 
> Under high load, the test can still cause a GDB internal error (see details
> below).
> 
> This patch fixes this crash, and improves/factorises some wait kind traces.
> 
> Tested on debian/amd64 + run one test with 'set debug infrun 1'.
> 
> Changes compared to the first version:
>   * Handles the suggestions of Kevin to trace the relevant elements
>     of the wait status (this is done by calling target_waitstatus_to_string).
>   * Some other changes to factorise wait status tracing.
> 
> Note that using target_waitstatus_to_string instead of the 'locally printed'
> status kind strings means that debug trace that was using strings such as:
>    "EXITED" or "TARGET_WAITKIND_EXITED"
> will now use what is printed by target_waitstatus_to_string e.g.
>    "exited".
> 
> gdb/ChangeLog
> 2019-03-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* infrun.c (stop_all_threads): If debug_infrun, always
> 	trace the wait status after wait_one, using
> 	target_waitstatus_to_string and target_pid_to_str.
> 	(handle_inferior_event): Replace various trace of
> 	wait status kind by a single trace.
> 	* gdb/gnu-nat.c (gnu_nat_target::wait): Replace local
> 	wait status kind image by target_waitstatus_to_string.
> 	* target/waitstatus.c (target_waitstatus_to_string): Fix
> 	obsolete comment.

Okay.

Kevin


  reply	other threads:[~2019-04-01 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30  9:58 Philippe Waroquiers
2019-04-01 16:32 ` Kevin Buettner [this message]
2019-04-01 19:05   ` Philippe Waroquiers
2019-09-11 17:05     ` Tom de Vries
2019-09-12 11:30       ` Kevin Buettner
     [not found]         ` <ed07a975-d5f9-76f2-863f-2d66593b49d9@suse.de>
2019-09-12 17:15           ` [PATCH, 8.3][gdb/testsuite] Mark watchthreads-reorder.exp FAIL as KFAIL Tom de Vries
2019-04-04  9:28 ` [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace Thomas Schwinge
2019-04-05 21:21   ` Philippe Waroquiers

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=20190401093248.615b2c5c@f29-4.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    /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