From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30217 invoked by alias); 3 Jan 2007 18:27:50 -0000 Received: (qmail 30209 invoked by uid 22791); 3 Jan 2007 18:27:49 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 03 Jan 2007 18:27:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H2Apy-000590-Tr; Wed, 03 Jan 2007 13:27:43 -0500 Date: Wed, 03 Jan 2007 18:27:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] DW_CFA_GNU_negative_offset_extended support Message-ID: <20070103182742.GD17935@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20061230190615.GA22829@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061230190615.GA22829@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) 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-01/txt/msg00070.txt.bz2 On Sat, Dec 30, 2006 at 08:06:15PM +0100, Jan Kratochvil wrote: > The testcase is not good as it is i386-limited. > Unaware how to produce such CFI with new GCC. You can't; that's the whole point :-) It was a GNU extension and it was replaced by a standard opcode. > + case DW_CFA_GNU_negative_offset_extended: > + insn_ptr = read_uleb128 (insn_ptr, insn_end, ®); > + insn_ptr = read_uleb128 (insn_ptr, insn_end, &offset); > + offset *= fs->data_align; > + dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1); > + fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET; > + fs->regs.reg[reg].loc.offset = -offset; > + break; > + What about the eh_frame_p check in all the other cases? Do you know if DW_CFA_GNU_negative_offset_extended was a factored offset? I'm guessing yes from Jakub's patch, but I don't know. If it was not, the multiplicaton by data_align is incorrect. If it was, then it's right the way you have it. > +# We should stop in abort(3). > + > +gdb_test "run" \ > + "Program received signal SIGABRT,.*" \ > + "run" Please use gdb_run_cmd instead. See other tests for an example. ("run" doesn't work for remote targets.) > +send_gdb "info frame\n"; > +gdb_expect { > + -re "Stack level 3, frame at (0x\[0-9a-f\]+):.*Saved registers:.* ecx at (0x\[0-9a-f\]+),.*" { > + pass "Value of the CFI inserted register" > + if { [string compare $expect_out(1,string) $expect_out(2,string)] } then { > + fail "Value of the CFI inserted register" > + } else { > + pass "Value of the CFI inserted register" > + } > + } > + default { > + fail "Existence of the CFI inserted register" > + } > +} Please use gdb_test_multiple instead of send_gdb / gdb_expect. Then you won't need the default case, which was wrong above anyway - it has to consume the prompt. Also, I think you have a typo - didn't mean for that to pass twice, right? -- Daniel Jacobowitz CodeSourcery