-catch-load
Command-catch-load [ -t ] [ -d ] regexp
Add a catchpoint for library load events. If the ‘-t’ option is used, the catchpoint is a temporary one (see Setting Breakpoints). If the ‘-d’ option is used, the catchpoint is created in a disabled state. The ‘regexp’ argument is a regular expression used to match the name of the loaded library.
The corresponding gdb command is ‘catch load’.
-catch-load -t foo.so ^done,bkpt={number="1",type="catchpoint",disp="del",enabled="y", what="load of library matching foo.so",catch-type="load",times="0"} (gdb)
-catch-unload
Command-catch-unload [ -t ] [ -d ] regexp
Add a catchpoint for library unload events. If the ‘-t’ option is used, the catchpoint is a temporary one (see Setting Breakpoints). If the ‘-d’ option is used, the catchpoint is created in a disabled state. The ‘regexp’ argument is a regular expression used to match the name of the unloaded library.
The corresponding gdb command is ‘catch unload’.
-catch-unload -d bar.so ^done,bkpt={number="2",type="catchpoint",disp="keep",enabled="n", what="load of library matching bar.so",catch-type="unload",times="0"} (gdb)