Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gdb: add user-created frames to stash
A subsequent patch makes it possible for frame_info_ptr to reinflate user-created frames. If two frame_info_ptr objects wrapping the same user-created frame_info need to do reinflation, we want them to end up pointing to the same frame_info instance, and not create two separate frame_infos. Otherwise, GDB gets confused down the line, as the state kept in one frame_info object starts differing from the other frame_info. Achieve this by making create_new_frame place the user-created frames in the frame stash. This way, when the second frame_info_ptr does reinflation, it will find the existing frame_info object, created by the other frame_info_ptr, in the frame stash. To make the frame stash differentiate between regular and user-created frame infos which would otherwise be equal, change frame_addr_hash and frame_id::operator== to account for frame_id::user_created_p. I made create_new_frame look up existing frames in the stash, and only create one if it doesn't find one. The goal is to avoid the "select-frame view"/"info frame view"/"frame view" commands from overriding existing entries into the stash, should the user specify the same frame more than once. This will also help in the subsequent patch that makes frame_info_ptr capable of reinflating user-created frames. It will be able to just call create_new_frame and it will do the right thing. Change-Id: I14ba5799012056c007b4992ecb5c7adafd0c2404 Reviewed-By: Bruno Larsen <[email protected]>
- Loading branch information