Re: [PATCHv9 04/14] gdb: the extra_string in a dprintf breakpoint is never nullptr

Andrew Burgess
2024-03-31T10:27:50Z

Andrew Burgess <aburgess@redhat.com> writes:

> Given the changes in the previous couple of commits, this commit
> cleans up some of the asserts and 'if' checks related to the
> extra_string within a dprintf breakpoint.
>
> This commit:
>
> 1. Adds some asserts to update_dprintf_command_list about the
> breakpoint type, and that the extra_string is not nullptr,
>
> 2. Given that we know extra_string is not nullptr (this is enforced
> when the breakpoint is created), we can simplify
> code_breakpoint::code_breakpoint -- it no longer needs to check for
> the extra_string is nullptr case,
>
> 3. In dprintf_breakpoint::re_set we can remove the assert (this will
> be checked within update_dprintf_command_list, we can also remove
> the redundant 'if' check.
>
> There should be no user visible changes after this commit.

I've gone ahead and committed this patch.

Thanks,
Andrew