Hi Bohdan,
On 23/10/2023 14:51, Bohdan Tymkiv wrote:
Hello dear OpenOCD maintainers,
While working with the mem_ap target I noticed that setting a
breakpoint causes a crash in target_add_breakpoint
because target->type->add_breakpoint is NULL. I discovered this by
accident, just forgot to switch to the cortex_m before setting a
breakpoint.
It turned out that there are numerous places in target.c where NULL
pointer check is missing so I would like to submit a fix but I have a
question.
I would like to use the modern LOG_TARGET_XXX macros for logging and
there are lots of lines in the target.c similar to this:
LOG_WARNING("target %s is not halted (hit watchpoint)", target->cmd_name);
Is it a good idea to change all of them to LOG_TARGET_XXX to make logs
more consistent?
Sure. We switched to LOG_TARGET_ macros at some places where the target
name was desperately missing.
There is still lot of work to do...
Is it OK to submit a single patch with both changes or it would be
better to split it into two separate patches?
Please submit separate patches
Thanks
Tomas