[PATCH 11/12] gdb: make displaced stepping implementation capable of managing multiple buffers
Simon Marchi
simark@simark.ca
Mon Nov 30 19:01:06 GMT 2020
On 2020-11-24 8:41 p.m., Pedro Alves wrote:
> A few minor comments below. Otherwise LGTM.
I forgot to reply to the other comments.
> On 11/10/20 9:46 PM, Simon Marchi via Gdb-patches wrote:
>> - return DISPLACED_STEP_PREPARE_STATUS_ERROR;
>> + for (displaced_step_buffer &candidate : m_buffers)
>> + {
>> + bool bp_in_range = breakpoint_in_range_p (aspace, candidate.addr, len);
>> + bool is_free = candidate.current_thread == nullptr;
>> +
>> + if (!bp_in_range)
>> + {
>> + if (is_free)
>
> tabs vs spaces.
Done.
>> + {
>> + buffer = &candidate;
>> + break;
>> + }
>> + else
>> + {
>> + /* This buffer would be suitable, but it's used right now. */
>> + fail_status = DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE;
>> + }
>> + }
>
> tabs vs spaces.
Done.
>> + struct displaced_step_buffer
>> + {
>> + displaced_step_buffer (CORE_ADDR addr)
>
> "explicit".
Done.
>
>> + : addr (addr)
>> + {}
>> +
>> + const CORE_ADDR addr;
>> +
>> + /* The original PC of the instruction currently begin stepped. */
>
> "begin" -> "being" ?
Indeed.
Thanks,
Simon
More information about the Gdb-patches
mailing list