This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] ftrace: Fix gdbserver crash when doing tstatus after detach or process exit
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 28 Apr 2016 13:28:15 -0400
- Subject: Re: [PATCH] ftrace: Fix gdbserver crash when doing tstatus after detach or process exit
- Authentication-results: sourceware.org; auth=none
- References: <1459344024-2260-1-git-send-email-simon dot marchi at ericsson dot com> <57224295 dot 6050504 at ericsson dot com>
On 16-04-28 01:04 PM, Simon Marchi wrote:
>> +# Check that the target supports trace.
>> +if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
I just saw that I used gdb_compile_pthreads. As Yao mentioned in another thread,
it should be gdb_compile instead.
>> + untested "Couldn't compile test program"
>> + return -1
>> +}
>> +
>> +clean_restart ${testfile}
>> +
>> +if ![runto_main] {
>> + fail "Can't run to main to check for trace support"
>> + return -1
>> +}
>> +
>> +if $use_gdb_stub {
>> + # This test is about testing commands after detaching from a process or
>> + # after letting a process exit, so it doesn't make sense to run it if the
>> + # target is stub-like.
>> + unsupported "This test is not supported for GDB stub targets."
>> + return -1
>> +}
>> +
>> +if ![gdb_target_supports_trace] {
>> + unsupported "target does not support trace"
>> + return -1
>> +}
>> +
>> +# Compile the test case with the in-process agent library.
>> +set libipa [get_in_proc_agent]
>> +gdb_load_shlibs $libipa
>> +
>> +lappend options shlib=$libipa
>> +
>> +if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
Same here.