On 1/27/21 10:37 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> 2021-01-27 Tom de Vries > > Tom> PR breakpoints/27205 > Tom> * breakpoint.c (create_longjmp_master_breakpoint_probe) > Tom> (create_longjmp_master_breakpoint_names): New function, factored out > Tom> of ... > Tom> (create_longjmp_master_breakpoint): ... here. Only try to install > Tom> longjmp_names breakpoints in libc.so/libc.so.debug if installing probe > Tom> breakpoint in libc.so failed. > > This looks reasonable to me. Thanks for doing it. > > Tom> + /* Skip separate debug object. */ > Tom> + if (obj->separate_debug_objfile_backlink) > > Normally this would be written != nullptr. > Ack, fixed. > Tom> + /* Iterate over separate debug objects and try longjmp_names > Tom> + kind breakpoints. */ > Tom> + for (objfile *sepdebug = obj->separate_debug_objfile; > Tom> + sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) > Tom> + if (create_longjmp_master_breakpoint_names (sepdebug)) > Tom> + break; > > I guess this can't use separate_debug_iterator / separate_debug_range > since that returns the parent objfile first. Ah, I didn't know about this iterator. I think this is precisely what we need (there is some extra code before this bit that calls create_longjmp_master_breakpoint_names (obj), so we could eliminate that). So, thanks a lot for pointing that out :) [ BTW, I think separate_debug_iterator / separate_debug_range is a bit of a misnomer, if it iterates over the parent obj first. It iterates over all the objects that could contain debug information, also if there's no separate debug info to begin with, f.i. if the parent object is unstripped and contains all the debug info. So perhaps debug_objfile_iterator / debug_objfile_range is more appropriate ? ] Anyway, updated the patch to use separate_debug_range, attached below. Will commit shortly. Thanks, - Tom