This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]