[PATCH v2] gdb: Do not interrupt atomic sequences for ARC
Tom Tromey
tom@tromey.com
Fri Feb 5 16:13:58 GMT 2021
>>>>> "Shahab" == Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org> writes:
Shahab> From: Shahab Vahedi <shahab@synopsys.com>
Shahab> An atomic sequence for ARC looks something like below (For a better
Shahab> understanding of "llock", "scond", and "LF", please read [1]):
Hi. Thanks for the patch.
I had a couple of nits but nothing serious.
Shahab> + std::vector<CORE_ADDR> next_pcs = {};
You don't need " = {}" here.
Shahab> + /* If more than one conditial branch is found, this is not
Typo, "conditional".
Shahab> + if (is_pattern_valid)
Shahab> + /* Get next instruction after scond(d). There is no limm. */
Shahab> + next_pcs.push_back (insn.address + insn.length);
In the gdb style, the body of this "if" should be braced.
Normally a single statement isn't braced, but a comment requires the
braces once again.
Shahab> std::vector<CORE_ADDR> next_pcs;
Shahab> + if (curr_insn.insn_class == LLOCK)
Shahab> + return handle_atomic_sequence (curr_insn, di);
I'd push this condition before the declaration of next_pcs, to avoid
invoking that constructor on this branch.
I think this is ok with these minor tweaks. Thanks.
Tom
More information about the Gdb-patches
mailing list