From owner-svn-src-all@FreeBSD.ORG Fri Jul 17 21:15:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 310831065738; Fri, 17 Jul 2009 21:15:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 202218FC14; Fri, 17 Jul 2009 21:15:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6HLFAhN082255; Fri, 17 Jul 2009 21:15:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HLFAfa082253; Fri, 17 Jul 2009 21:15:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200907172115.n6HLFAfa082253@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 17 Jul 2009 21:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195747 - head/lib/libdwarf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 21:15:10 -0000 Author: np Date: Fri Jul 17 21:15:09 2009 New Revision: 195747 URL: http://svn.freebsd.org/changeset/base/195747 Log: Store accurate offset information in CTF data. A large number of structs had incorrect member offsets, limiting dtrace's usefulness when working with them. An example of incorrect info (struct rtentry) from before this fix: <1738> STRUCT rtentry (200 bytes) rt_nodes type=1731 off=0 rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96 rt_flags type=3 off=65344 <== wrong again, and so on.. ... Approved by: re (kib), gnn (mentor) MFC after: 2 weeks Modified: head/lib/libdwarf/dwarf_loc.c Modified: head/lib/libdwarf/dwarf_loc.c ============================================================================== --- head/lib/libdwarf/dwarf_loc.c Fri Jul 17 21:11:08 2009 (r195746) +++ head/lib/libdwarf/dwarf_loc.c Fri Jul 17 21:15:09 2009 (r195747) @@ -236,7 +236,7 @@ dwarf_op_num(uint8_t pointer_size, uint8 case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - uval = dwarf_decode_sleb128(&p); + uval = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */ @@ -458,7 +458,7 @@ dwarf_loc_fill(Dwarf_Locdesc *lbuf, uint case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - operand1 = dwarf_decode_sleb128(&p); + operand1 = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */