Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@false.org>,
	Jim Blandy <jimb@codesourcery.com>,
	        Vladimir Prus <ghost@cs.msu.su>
Subject: Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, 	for vDSO32)
Date: Fri, 30 Nov 2007 15:09:00 -0000	[thread overview]
Message-ID: <20071130150846.GA24874@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20071130145613.GA5941@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

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

[-- Attachment #2: dw2ranges-overlap.patch --]
[-- Type: text/plain, Size: 3358 bytes --]

2007-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* 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 <http://www.gnu.org/licenses/>.
+ */
+
+/* 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

  reply	other threads:[~2007-11-30 15:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 18:17 Jan Kratochvil
2007-10-09 18:22 ` Daniel Jacobowitz
2007-10-09 18:59   ` Jan Kratochvil
2007-10-09 19:13     ` Daniel Jacobowitz
2007-11-24 15:43       ` Jan Kratochvil
2007-11-25 14:48         ` Daniel Jacobowitz
2007-11-30  7:42         ` Vladimir Prus
2007-11-30 11:10           ` Jan Kratochvil
2007-11-30 14:56             ` Daniel Jacobowitz
2007-11-30 15:09               ` Jan Kratochvil [this message]
2007-12-01  0:55               ` Jim Blandy
2007-12-01 17:30                 ` Joel Brobecker
2007-12-09 20:40               ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Jan Kratochvil
2007-12-10  0:21                 ` [patch] Removal of the FIND_PC_SECT_PSYMTAB search [Re: [patch] Discontiguous PSYMTABs] Jan Kratochvil
2007-12-17  1:02                 ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Daniel Jacobowitz
2007-12-17  1:03                   ` Daniel Jacobowitz
2007-12-17  2:41                     ` [patch] Discontiguous PSYMTABs Jan Kratochvil
2007-12-17  3:41                       ` Daniel Jacobowitz
2008-04-23 22:15                     ` [patch] [0/2] " Jan Kratochvil
2008-04-23 22:18                     ` [patch] [1/2] Discontiguous PSYMTABs (partial DIEs base address) Jan Kratochvil
2008-05-01 19:43                       ` Daniel Jacobowitz
2008-04-23 22:24                     ` [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap) Jan Kratochvil
2008-05-01 19:46                       ` Daniel Jacobowitz
2008-05-04 17:38                         ` Jan Kratochvil
2008-05-12 22:24                       ` Overlay support broken (Re: [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap)) Ulrich Weigand
2008-05-12 22:37                         ` Michael Snyder
2008-05-13  1:39                           ` Daniel Jacobowitz
2008-05-13  3:17                             ` Jan Kratochvil
2008-05-13 15:37                             ` Doug Evans
2008-05-13 15:42                             ` Michael Snyder
2008-05-13 15:31                           ` Doug Evans
2008-05-12 23:52                         ` Jan Kratochvil
2008-05-13 18:45                           ` Ulrich Weigand
2008-05-13 19:08                             ` Pedro Alves
2008-05-13 19:01                               ` Pedro Alves
2008-05-13 19:11                               ` Michael Snyder
2008-05-15 16:39                             ` Jan Kratochvil
2008-05-15 18:16                               ` Ulrich Weigand
2008-05-15 18:44                                 ` Daniel Jacobowitz
2008-05-15 19:06                                   ` Ulrich Weigand
2008-05-16 18:32                                   ` Ulrich Weigand
2008-05-15 19:18                               ` Michael Snyder
2008-04-23 21:31                 ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Doug Evans
2008-04-23 21:31                   ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071130150846.GA24874@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=jimb@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox