From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12817 invoked by alias); 22 Sep 2014 06:03:55 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 12799 invoked by uid 89); 22 Sep 2014 06:03:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Sep 2014 06:03:49 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XVwiv-0005AR-1W from Yao_Qi@mentor.com ; Sun, 21 Sep 2014 23:03:45 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Sun, 21 Sep 2014 23:03:44 -0700 From: Yao Qi To: Eli Zaretskii CC: Subject: Re: Complex DWARF expressions References: <83sijkydk4.fsf@gnu.org> Date: Mon, 22 Sep 2014 06:03:00 -0000 In-Reply-To: <83sijkydk4.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Sep 2014 22:32:43 +0300") Message-ID: <87a95sxkjr.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00069.txt.bz2 Eli Zaretskii writes: > Range 0x100aaf7-0x100ad4c: a complex DWARF expression: > 0: DW_OP_GNU_entry_value > 2: DW_OP_reg2 [$edx] > 3: DW_OP_stack_value > > "A variable in $edx" I understand, but what about the "complex DWARF > expression" parts? Is there any way a mere mortal such as myself can > decipher this to the effect of understanding in which register or at > what address can I look up the value, assuming that I know at which PC > address the program stopped? > > (Yes, I've looked at the DWARF Standard, but couldn't understand from > the description of these location descriptors how to convert them to > either a register or a memory address.) DW_OP_GNU_entry_value isn't in DWARF Standard and it is documented here http://www.dwarfstd.org/ShowIssue.php?issue=3D100909.1 If I understand the doc above correctly, the entry above means if PC is within range 0x100aaf7-0x100ad4c, the value of new_width is the value of $edx at the moment entering this function. IOW, to get value of new_width, needs to unwind frame and read $edx. --=20 Yao (=E9=BD=90=E5=B0=A7)