This is the mail archive of the gdb-patches@sourceware.org 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] "tfind" across unavailable-stack frames.


On 12/14/2013 01:49 AM, Pedro Alves wrote:
> gdb/
> 2013-12-13  Pedro Alves  <palves@redhat.com>
> 
> 	* frame.h (enum frame_id_stack_status): New enum.
> 	(struct frame_id) <stack_addr>: Adjust comment.
> 	<stack_addr_p>: Delete field, replaced with ...
> 	<stack_status>: ... this new field.
> 	(frame_id_build_unavailable_stack): Declare.
> 	* frame.c (frame_addr_hash, fprint_field, outer_frame_id)
> 	(frame_id_build_special): Adjust.
> 	(frame_id_build_unavailable_stack): New function.
> 	(frame_id_build, frame_id_build_wild): Adjust.
> 	(frame_id_p, frame_id_eq, frame_id_inner): Adjust to take into
> 	account frames with unavailable stack.
> 
> 	* amd64-tdep.c (amd64_frame_this_id)
> 	(amd64_sigtramp_frame_this_id, amd64_epilogue_frame_this_id): Use
> 	frame_id_build_unavailable_stack.
> 	* dwarf2-frame.c (dwarf2_frame_this_id): Likewise.

Do we need to update tailcall_frame_this_id as well?  I can't find an
easy way to reproduce it on tailcall frame (using
gdb.arch/amd64-tailcall-* cases).

Patch looks right to me, two nits on comments below,

> @@ -169,6 +187,12 @@ extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr,
>  					       CORE_ADDR code_addr,
>  					       CORE_ADDR special_addr);
>  
> +/* Construct a frame ID representing a frame where the stack address
> +   exists, but is unavailable.  The first parameter is the frame's

Remove "first"? since we only have one parameter here.

> +   constant code address (typically the entry point).  The special
> +   identifier address is set to indicate a wild card.  */
> +extern struct frame_id frame_id_build_unavailable_stack (CORE_ADDR code_addr);
> +

What does the last sentence mean in the comments?

-- 
Yao (éå)


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