This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2, alpha]: Handle single-stepping of atomic sequences
On Fri, Nov 18, 2011 at 1:18 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
>> The gcc simulate-thread.exp testsuite exposed the problem in handling
>> of alpha atomic sequences. Single-stepping broke link in alpha's LL/SC
>> atomic sequences.
>>
>> Attached patch copies handling of atomic sequences from rs6000-tdep.c
>> and adapts the functionality for alpha.
>>
>> I don't have write access, so If OK, please someone commit this patch
>> to gdb CVS.
>
> [v2]: Since this patch is almost a copy of rs6000-tdep.c atomic
> sequence handling, also take into account proposed changes [1] to
> original rs6000 implementation.
>
> [1] http://sourceware.org/ml/gdb-patches/2011-11/msg00468.html
2011-11-24 Uros Bizjak <ubizjak@gmail.com>
* alpha-tdep.c (br_opcode): New.
(ldl_l_opcode, ldq_l_opcode, stl_c_opcode, stq_c_opcode): Ditto.
(alpha_deal_with_atomic_sequence): New function.
(alpha_gdbarch_init): Handle single stepping of atomic sequences
with alpha_deal_with_atomic_sequence.
[v3]: As suggested by Ulrich, handle all branch instructions inside
compare and exchange loop.
Re-tested on alphaev68-pc-linux-gnu, also with simulate-thread.exp
from GCC testsuite.
Uros.