From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15559 invoked by alias); 19 Nov 2005 13:45:05 -0000 Received: (qmail 15384 invoked by uid 22791); 19 Nov 2005 13:45:01 -0000 Received: from ip127.bb146.pacific.net.hk (HELO stl.com.hk) (202.64.146.127) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 19 Nov 2005 13:45:01 +0000 Received: from 241.206.17.210.dyn.pacific.net.hk ([210.17.206.241] helo=[192.168.1.10]) by stl.com.hk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1EdSxB-000337-J6; Sat, 19 Nov 2005 21:40:29 +0800 Message-ID: <437F2C4D.5060801@tausq.org> Date: Sat, 19 Nov 2005 19:41:00 -0000 From: Randolph Chung User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) MIME-Version: 1.0 To: Daniel Jacobowitz CC: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] Support DW_OP_breg for tracepoints References: <43775DDB.6020408@tausq.org> <8f2776cb0511131539j17ae5144n87b1aedab1fa420e@mail.gmail.com> <4377D0CB.2010304@tausq.org> <20051114022745.GA10422@nevyn.them.org> In-Reply-To: <20051114022745.GA10422@nevyn.them.org> Content-Type: multipart/mixed; boundary="------------060206060501060505050201" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00369.txt.bz2 This is a multi-part message in MIME format. --------------060206060501060505050201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 195 > I assumed it was right by analogy to the existing frame base code. > Presumably I was just wrong the first time. Please fix both places. this is what i finally checked in. thanks randolph --------------060206060501060505050201 Content-Type: text/x-patch; name="d.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="d.diff" Content-length: 1553 2005-11-19 Randolph Chung * dwarf2loc.c (dwarf2_tracepoint_var_ref): Remove extra add for DW_OP_fbreg. Handle DW_OP_breg0 through DW_OP_breg31. Print DWARF opcode for unsupported case. Index: dwarf2loc.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2loc.c,v retrieving revision 1.31 diff -u -p -r1.31 dwarf2loc.c --- dwarf2loc.c 14 Nov 2005 22:25:16 -0000 1.31 +++ dwarf2loc.c 19 Nov 2005 13:41:37 -0000 @@ -477,13 +477,30 @@ dwarf2_tracepoint_var_ref (struct symbol ax_const_l (ax, frame_offset); ax_simple (ax, aop_add); - ax_const_l (ax, frame_offset); + value->kind = axs_lvalue_memory; + } + else if (data[0] >= DW_OP_breg0 + && data[0] <= DW_OP_breg31) + { + unsigned int reg; + LONGEST offset; + gdb_byte *buf_end; + + reg = data[0] - DW_OP_breg0; + buf_end = read_sleb128 (data + 1, data + size, &offset); + if (buf_end != data + size) + error (_("Unexpected opcode after DW_OP_breg%u for symbol \"%s\"."), + reg, SYMBOL_PRINT_NAME (symbol)); + + ax_reg (ax, reg); + ax_const_l (ax, offset); ax_simple (ax, aop_add); + value->kind = axs_lvalue_memory; } else - error (_("Unsupported DWARF opcode in the location of \"%s\"."), - SYMBOL_PRINT_NAME (symbol)); + error (_("Unsupported DWARF opcode 0x%x in the location of \"%s\"."), + data[0], SYMBOL_PRINT_NAME (symbol)); } /* Return the value of SYMBOL in FRAME using the DWARF-2 expression --------------060206060501060505050201--