This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] fix gdb.threads/non-stop-fair-events.exp timeouts
- From: Pedro Alves <palves at redhat dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>, Yao Qi <yao dot qi at linaro dot org>
- Date: Wed, 09 Sep 2015 19:40:18 +0100
- Subject: Re: [RFC] fix gdb.threads/non-stop-fair-events.exp timeouts
- Authentication-results: sourceware.org; auth=none
- References: <55E9CCCD dot 7060604 at codesourcery dot com> <55EF0D11 dot 2020200 at redhat dot com> <55F05975 dot 4030207 at codesourcery dot com>
On 09/09/2015 05:08 PM, Sandra Loosemore wrote:
> On 09/08/2015 10:30 AM, Pedro Alves wrote:
>>
>> Yeah, I've seen this before with a local series I use for debugging
>> software single-step things that implements software single-stepping
>> on x86. I just re-tried it now after rebasing that series to
>> current mainline, and I still see the time outs against gdbserver.
>>
>> AFAICS, nios2 is a software single-step target that does not implement
>> displaced stepping either. I had a patch for this that I had
>> never posted. See attached.
>>
>
> Hmmm, these two patches are not working for me. The trouble is that
> this part:
>
>> +gdb_test_multiple "si" $msg {
>> + -re "displaced pc to.*$gdb_prompt $" {
>> + set displaced_stepping_enabled 1
>> + }
>> + -re ".*$gdb_prompt $" {
>> + }
>> +}
>
> is causing the target to step from main to pthread_self, which is in a
> different file. This causes the subsequent breakpoint commands to fail,
> and things go south from there:
OK, I got "lucky" on x86 and a stepi runs some instruction before the call.
Could you try simply replacing the "si" with "next" ? It doesn't matter
whether that issues several single-steps or not. What matters is that gdb
tries to step past the breakpoint that is set at the current PC (from the
earlier runto_main). We're trying to figure out if gdb uses displaced
stepping for that.
Thanks,
Pedro Alves