From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27277 invoked by alias); 25 Sep 2002 10:31:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27270 invoked from network); 25 Sep 2002 10:31:44 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 25 Sep 2002 10:31:44 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 8F61459D350; Wed, 25 Sep 2002 12:31:43 +0200 (CEST) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g8PAVc320500; Wed, 25 Sep 2002 12:31:42 +0200 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3D91908A.8030308@suse.cz> Date: Wed, 25 Sep 2002 03:31:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Gerhard Tonn Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFC] DWARF2 CFI exploitation for Linux on S/390 References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00607.txt.bz2 Gerhard Tonn wrote: > 1) The sequence and number of DWARF2 registers are different from the gdb > registers on s390 for some reason. > 2) The DWARF2 CFA value is different from the frame_base value. > > In order to adapt the code to the first item, I have introduced #defines > for DWARF2 registers and a REGNUM_TO_DWARF2_REG macro and its > implementation. See the attached patch for details. It makes sense. This wasn't yet noticed because the numbering of most dwarf2 and x86-64 registres is intentionally the same. > The following code fragment in dwarf2cfi.c around line 1316 seems to be > intel specific, at least on s390 it doesn't make sense. Should I move it to > a gdbarch function? > > if (i == SP_REGNUM) > { > context->reg[i].how = REG_CTX_VALUE; > context->reg[i].loc.addr = cfa; > } Not only Intel specific. Also AMD specific ;-) > Finally I am interested in how signal frame and dummy frame handling is > supposed to work with DWARF2 CFI support. Does anybody have done already > work in this area? That's the question I'm solving too. The first approach (for x86-64) is here: http://sources.redhat.com/ml/gdb-patches/2002-09/msg00384.html Basically I don't set_gdbarch_*() directly to cfi_*() functions but instead to corresponding x86_64_*() functions, that eventually call cfi_*() themselves. For sighandler caller frames I'm afraid I'll have to manually fill appropriate structures in struct context (probably in those x86_64_*() functions). Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz