From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2618 invoked by alias); 23 Sep 2007 21:57:53 -0000 Received: (qmail 2610 invoked by uid 22791); 23 Sep 2007 21:57:52 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 23 Sep 2007 21:57:50 +0000 Received: from mailhub1.br.ibm.com (unknown [9.18.232.109]) by igw3.br.ibm.com (Postfix) with ESMTP id B691B390020 for ; Sun, 23 Sep 2007 18:51:23 -0300 (BRT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l8NLvlFk3129470 for ; Sun, 23 Sep 2007 18:57:47 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l8NLvlN0013853 for ; Sun, 23 Sep 2007 18:57:47 -0300 Received: from hactar.local ([9.18.201.110]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l8NLvkUw013849 for ; Sun, 23 Sep 2007 18:57:47 -0300 Subject: [patch] describe some frame unwinder functions From: Thiago Jung Bauermann To: GDB Patches Content-Type: multipart/mixed; boundary="=-ss36K5E64DHD6qNE4Y6n" Date: Sun, 23 Sep 2007 21:57:00 -0000 Message-Id: <1190584664.8479.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00330.txt.bz2 --=-ss36K5E64DHD6qNE4Y6n Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 259 Hi, This patch adds explanations to some functions in the frame unwinder. I think they're very helpful (albeit somewhat concise), assuming I got them right. :-) What do you think? -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center --=-ss36K5E64DHD6qNE4Y6n Content-Disposition: attachment; filename=frame-unwinder-comments.patch Content-Type: text/x-patch; name=frame-unwinder-comments.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 1798 2007-09-23 Thiago Jung Bauermann * frame.c (frame_pc_unwind): Add purpose explanation. (frame_func_unwind): Likewise. (frame_register_unwind): Likewise. (get_frame_pc): Likewise. Index: src-git/gdb/frame.c =================================================================== --- src-git.orig/gdb/frame.c 2007-09-14 18:45:28.000000000 -0300 +++ src-git/gdb/frame.c 2007-09-23 18:46:21.000000000 -0300 @@ -421,6 +421,8 @@ frame_find_by_id (struct frame_id id) return NULL; } +/* Return the PC value at the time the caller of this frame was active. */ + CORE_ADDR frame_pc_unwind (struct frame_info *this_frame) { @@ -468,6 +470,9 @@ frame_pc_unwind (struct frame_info *this return this_frame->prev_pc.value; } +/* Return the address of the first instruction in the function which + * called frame FI. */ + CORE_ADDR frame_func_unwind (struct frame_info *fi, enum frame_type this_type) { @@ -547,6 +552,16 @@ frame_pop (struct frame_info *this_frame reinit_frame_cache (); } +/* Obtain value of REGNUM at the time FRAME was active. + * + * *OPTIMIZEDP is set to 1 if register value cannot be obtained. + * *LVALP is set to location in inferior where the value is saved. + * If it is saved in inferior memory, *ADDRP is set to its address. + * If it is saved in another register, *REALNUMP is set to the new + * register number. + * + * If BUFFERP is not NULL, save register value to *BUFFERP. */ + void frame_register_unwind (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, @@ -1485,6 +1500,8 @@ get_prev_frame (struct frame_info *this_ return get_prev_frame_1 (this_frame); } +/* Return the PC value at the time this frame was active. */ + CORE_ADDR get_frame_pc (struct frame_info *frame) { --=-ss36K5E64DHD6qNE4Y6n--