This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] "tfind" across unavailable-stack frames.
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 16 Dec 2013 08:39:29 +0000
- Subject: RE: [PATCH] "tfind" across unavailable-stack frames.
- Authentication-results: sourceware.org; auth=none
- References: <1366214779 dot 30939 dot 1 at abidh-ubunto1104> <516F11B9 dot 8030202 at redhat dot com> <52AB48B6 dot 6040206 at redhat dot com>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Friday, December 13, 2013 6:50 PM
> +/* See frame.h. */
> +
> +struct frame_id
> +frame_id_build_unavailable_stack (CORE_ADDR code_addr)
> +{
> + struct frame_id id = null_frame_id;
> +
> + id.stack_status = FID_STACK_UNAVAILABLE;
> + id.code_addr = code_addr;
> + id.code_addr_p = 1;
> + return id;
> +}
For record-btrace, we would also need to allow special_addr.
I can also add another build function for this case.
> struct frame_info;
> @@ -97,8 +115,8 @@ struct frame_id
> function pointer register or stack pointer register. They are
> wrong.
>
> - This field is valid only if stack_addr_p is true. Otherwise, this
> - frame represents the null frame. */
> + This field is valid only if frame_id.stack_status is
> + FID_STACK_VALID. */
> CORE_ADDR stack_addr;
Maybe the comment should say that this field must be zero unless
stack_status == FID_STACK_VALID.
Frame_id_eq would compare stack_addr if stack_status compares
equal.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052