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: [patch] Fix for newer kernels with: t (tracing stop)


On 06/04/2016 01:29 PM, Jan Kratochvil wrote:
> Hi,
> 
> I did provide wrong ptrace data which should fail on their write.
> 	error (_("Unexpected error setting hardware debug registers"));
> But GDB did not print that error, only inferior did hang, because the data was
> not written.
> 
> It is because this error/exception gets suppressed by:
> linux_resume_one_lwp():
> 1578          if (!check_ptrace_stopped_lwp_gone (lp))
> 1579            throw_exception (ex);
> 
> Which happens because check_ptrace_stopped_lwp_gone()
> expects 'T (tracing stop)' while recent Linux kernels
> provide 't (tracing stop)' instad.
> 	What does lowercase t means in ps state code
> 	http://stackoverflow.com/questions/35895886/what-does-lowercase-t-means-in-ps-state-code

Eh, I'm not sure how I ended up with "T (tracing stop)"
in the first place last year, as I think I was on Fedora 20,
and lowercase "t (tracing stop)" is around since 2009.

> 
> Found it on:
> 	kernel-4.4.6-301.fc23.aarch64
> by:
> 	gdb/nat/aarch64-linux-hw-point.c
> 	-  ctrl |= ((1 << len) - 1) << 5;
> 	+  ctrl |= (((1 << len) - 1)&~1) << 5;
> 
> It does not change testsuite results on that F-23.aarch64 machine.
> I see no real regessions on rawhide.x86_64 machine (with F-23 kernel) although
> there were some fuzzy results I will need to check more.
> 
> OK for check-in?

OK.

I wonder whether it wouldn't simplify things to parse the
state into some new enum lwp_state instead of the current scheme
of passing state strings around.  I may give that a try as follow up.

Thanks,
Pedro Alves


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