[Pdbg] [RFC] Detect if we probed the target correctly

Balbir Singh bsingharora at gmail.com
Mon May 28 23:20:43 AEST 2018

On 22/05/18 18:41, Balbir Singh wrote:
> The patch adds detection of probe being called prior to calling
> read and write functions on the target. The idea being that
> we should not invoke these functions on unprobed targets.
> By default the status is set ot PDBG_TARGET_UNKNOWN
> and if the status of the target is UNKNOWN at the time of probe
> except for when it's being probed (Alistair pointed out that
> hmfsi probe routine for example calls its read and write routines
> in the operation of probing), a new status
> PDBG_TARGET_BEING_PROBED is added for detection of such
> recursion.
> All of this is done using macro's, the side-effect is that
> the namespace has been cleaned up to match the target structure.
> New DECLARE_HW_* and HW_UNIT_FN_NAME macros have been added
> 1. Allow for auto-probe in the future
> 2. Extend this infrastructure to non-read/write functions
> of targets (stop/reset/etc)
> 3. Cleanup to reduce the number of macros and clean up
> for macro size.
> Signed-off-by: Balbir Singh <bsingharora at gmail.com>

Any thoughts or comments on the approach?

Balbir Singh.

More information about the Pdbg mailing list