Patch Set 3: Code-Review+1

> Seems like a change to make a change. What issue was too difficult
 > to debug?

I remember during dyn TS and the following BROKEN_UNUSABLE recovery issue 
seeing state changes and spending time to figure out where those transitions 
came from. I think logging the line nrs is super handy and desirable.

 > call sites). Sure now __LINE__ points to the right place but you
 > can not put a breakpoint on state changes anymore.

That is a valid point. This could be solved by using the scheme we have in 
place e.g. with the FSMs: 
https://git.osmocom.org/libosmocore/tree/include/osmocom/core/fsm.h#n169

  #define osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T) \
        _osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T, \
                                 __BASE_FILE__, __LINE__)
  int _osmo_fsm_inst_state_chg(struct osmo_fsm_inst *fi, uint32_t new_state,
                             unsigned long timeout_secs, int T,
                             const char *file, int line);

i.e. still have an actual function, but provide a macro wrapper to add line 
info.

-- 
To view, visit https://gerrit.osmocom.org/3828
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I21789f8021290965b61a54a2b23177ccbbfe8321
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-HasComments: No

Reply via email to