Hello, "infrun.c" contains the call: get_frame_id (get_prev_frame (get_current_frame ())) (and from memory others are pending). It is used when trying to catch an inferior returning from a function. A breakpoint is set at "current frame"'s return address, and the breakpoint's frame ID is set to the previous frame's ID (so that recursive calls are correctly handled). Thing is, this apparently simple code has two nasty edge cases: - get_prev_frame returns NULL for the outer most frame That's ok though, get_frame_id turns a NULL frame into a null_frame_id. - get_prev_frame might return NULL if "current frame" is "main" Now that's a problem. get_prev_frame returns NULL not just when the outermost frame is reached, but also for a somewhat arbitrary set of conditions user visible conditions such as the current frame being "main". The breakpoint ents up incorrectly having a null_frame_id. The attached introduces a new method, frame_unwind_id, which will return the frame ID for cases where the above would have returned a NULL frame (it skips some of the tests). Now the challenge :-) Can anyone think of a testcase? I need to play a bit, but I'm not sure that I can come up with something. Andrew