This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] Add a sentinel frame



No. GDB is trying to perform:

pop_frame (get_current_frame())

with the assumption that it has a dummy frame and get_current_frame() will return it.


>That's what happens on i386 IIRC...


I thought that we wouldn't reach frame_chain_valid if the next frame
was a dummy frame.  Hmm, that only seems to happen for deprecated
generic dummy frames:

The variable `use_generic_dummy_frames' is deprecated because it is redundant. All targets should use generic dummy frames. Yes, the variable name is screwed up :-(


  if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
      && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
    return 1;

Oh I didn't realize the contents of frame_chain_valid had ended up
repeated in get_prev_frame, I've been looking at the wrong function.
That's why I didn't understand you.  Should the check above exist in
get_prev_frame also?

When you first committed that stuff, I warned you that would happen :-) The above test handled differently.

[Why does this logic need to be in more than one place?]

Because frame_chain_valid() is only there to keep legacy code working. Need to rename it, need to deprecate the rest of those old methods.


Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]