<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I would like to ask a question regarding <font face="SFMono-Regular" class="">"BreakpointHitCallback"</font>, which is declared as such:</div><div class=""><br class=""></div><div class=""><font face="SFMono-Regular" class="">bool (*BreakpointHitCallback)(void *baton,<br class="">                              StoppointCallbackContext *context,<br class="">                              lldb::user_id_t break_id,<br class="">                              lldb::user_id_t break_loc_id);</font></div><div class=""><font face="SFProText-Regular" class=""><br class=""></font></div><div class=""><font face="SFProText-Regular" class="">Is there any particular reason that </font><font face="SFMono-Regular" class="">"break_id"</font><font face="SFProText-Regular" class=""> and </font><font face="SFMono-Regular" class="">"break_loc_id"</font><font face="SFProText-Regular" class=""> are of type "</font><font face="SFMono-Regular" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">user_id_t"</span></font><font face="SFProText-Regular" class=""> (64-bit unsigned) instead of </font><font face="SFMono-Regular" class="">"break_id_t"</font><font face="SFProText-Regular" class=""> (32-bit signed), which is used both for </font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: SFMono-Regular;" class="">"Stoppoint::m_bid"</span><span style="font-family: SFProText-Regular;" class=""> and </span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: SFMono-Regular;" class="">"StoppointLocation::m_loc_id"</span><span style="font-family: SFProText-Regular;" class="">?</span></div><div class=""><font face="SFProText-Regular" class=""><br class=""></font></div><div class="">This causes an issue mainly with internal breakpoints, since the callback of an internal breakpoint with <font face="SFMono-Regular" class="">(ID == 0xfffffffe)</font> is called with <font face="SFMono-Regular" class="">(break_id == 0xfffffffffffffffe)</font>, forcing the callback to cast the argument back to a 32-bit signed in order to use it correctly, e.g. when the IDs are stored and need to be looked up.</div><div class=""><br class=""></div><div class="">A small example attempting to illustrate the problem: <a href="https://godbolt.org/z/nJM9Li" class="">https://godbolt.org/z/y8LbK2</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">― Vangelis</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>