From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14238 invoked by alias); 30 Nov 2007 15:09:11 -0000 Received: (qmail 14226 invoked by uid 22791); 30 Nov 2007 15:09:09 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Nov 2007 15:08:58 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAUF8uZd015624 for ; Fri, 30 Nov 2007 10:08:57 -0500 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAUF8uqq006791 for ; Fri, 30 Nov 2007 10:08:56 -0500 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id lAUF8r8D003798 for ; Fri, 30 Nov 2007 10:08:54 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.1/8.14.1) with ESMTP id lAUF8ouS024959; Fri, 30 Nov 2007 16:08:50 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.1/8.14.1/Submit) id lAUF8kF0024956; Fri, 30 Nov 2007 16:08:46 +0100 Date: Fri, 30 Nov 2007 15:09:00 -0000 From: Jan Kratochvil To: gdb-patches@sources.redhat.com Cc: Daniel Jacobowitz , Jim Blandy , Vladimir Prus Subject: Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32) Message-ID: <20071130150846.GA24874@host0.dyn.jankratochvil.net> References: <20071009180246.GA26829@host0.dyn.jankratochvil.net> <20071009181701.GA30757@caradoc.them.org> <20071009185434.GA27810@host0.dyn.jankratochvil.net> <20071009185931.GA1220@caradoc.them.org> <20071124154339.GA14913@host0.dyn.jankratochvil.net> <20071130111021.GA17867@host0.dyn.jankratochvil.net> <20071130145613.GA5941@caradoc.them.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20071130145613.GA5941@caradoc.them.org> User-Agent: Mutt/1.5.17 (2007-11-01) 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-11/txt/msg00565.txt.bz2 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 566 On Fri, 30 Nov 2007 15:56:13 +0100, Daniel Jacobowitz wrote: ... > Jim, can we get your addrmap changes in as they are, instead of > working on a representation change (which was the state when they were > briefly discussed, in October)? After that, it's simple to solve this > problem more accurately by using addrmaps for symtabs too, not just > blocks. Providing at least the updated testcase for now. It fails now on: FAIL: gdb.dwarf2/dw2-ranges.exp: info line func It would get IMO solved by a right patch for FIND_PC_SECT_SYMTAB otherwise. Regards, Jan --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="dw2ranges-overlap.patch" Content-length: 3358 2007-11-30 Jan Kratochvil * gdb.dwarf2/dw2-ranges2.S: New file. * gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'. * gdb.dwarf2/dw2-ranges.exp: Compile also "dw2-ranges2.S" and test also its MAIN2 and FUNC2 symbols. --- ./gdb/testsuite/gdb.dwarf2/dw2-ranges.S 25 Nov 2007 21:40:39 -0000 1.1 +++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges.S 30 Nov 2007 15:01:49 -0000 @@ -32,7 +32,10 @@ main: .int 0 .endfunc .size main, . - main - .section .text.func, "ax", @progbits + /* `.fini' section is here to make sure `dw2-ranges.S' + vs. `dw2-ranges2.S' overlap their DW_AT_ranges with eac other. */ + .section .fini, "ax", @progbits + .globl func .func func func: .int 0 --- ./gdb/testsuite/gdb.dwarf2/dw2-ranges.exp 25 Nov 2007 21:40:39 -0000 1.1 +++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges.exp 30 Nov 2007 15:01:49 -0000 @@ -30,9 +30,10 @@ if {![istarget *-*-linux*] set testfile "dw2-ranges" set srcfile ${testfile}.S -set binfile ${objdir}/${subdir}/${testfile}.o +set srcfile2 ${testfile}2.S +set binfile ${objdir}/${subdir}/${testfile} -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object debug] != "" } { +if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable debug] != "" } { return -1 } @@ -46,4 +47,7 @@ gdb_load ${binfile} # Wrong output: # No line number information available for address 0x4 +gdb_test "info line main" "Line \[0-9\]* of .* starts at address .* and ends at .*" gdb_test "info line func" "Line \[0-9\]* of .* starts at address .* and ends at .*" +gdb_test "info line main2" "Line \[0-9\]* of .* starts at address .* and ends at .*" +gdb_test "info line func2" "Line \[0-9\]* of .* starts at address .* and ends at .*" --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ./gdb/testsuite/gdb.dwarf2/dw2-ranges2.S 30 Nov 2007 15:01:49 -0000 @@ -0,0 +1,43 @@ +/* + Copyright 2007 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +/* Despite the sections below will be adjacent the assembler has to produce + DW_AT_ranges as the linker could place both sections at arbitrary locations. + */ + + /* Without this directive GAS will not emit DWARF2 unless we provide an + instruction to assemble. We want to avoid any instructions to + remain architecture independent. */ + .loc_mark_labels 1 + + .text + + .globl main2 + .func main2 +main2: .int 0 + .endfunc + .size main2, . - main2 + + /* `.fini' section is here to make sure `dw2-ranges.S' + vs. `dw2-ranges2.S' overlap their DW_AT_ranges with eac other. */ + .section .fini, "ax", @progbits + + .globl func2 + .func func2 +func2: .int 0 + .endfunc + .size func2, . - func2 --opJtzjQTFsWo+cga--