Only read current solibs when linker is consistent
This change speeds up solib event handling in GDB. On Android (svr4), the dynamic linker calls its 'rtld_db_dlactivity()' routine twice for each solib event (such as a call to 'dlopen()'.) The first such call is an indication that the solib list is about to be updated, and the second is an indication that the update is complete, and the solib list is back to being in a consistent state. The linker communicates this status via its 'r_state' field, which will be set to RT_CONSISTENT when the update is completed. Prior to this change, GDB would react to every solib event breakpoint by walking the solib list, looking for updates. But really it only makes sense for GDB to do so when r_state is set to RT_CONSISTENT. Bug: http://code.google.com/p/android/issues/detail?id=37677 Signed-off-by:Ryan V. Bissell <rbissell@nvidia.com>
Loading
Please sign in to comment