Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Ross Morley <ross@tensilica.com>
To: GDB List <gdb@sources.redhat.com>
Subject: Source info in discontiguous hand asm files
Date: Thu, 04 May 2006 01:23:00 -0000	[thread overview]
Message-ID: <44595771.1070907@tensilica.com> (raw)

Hello,

gdb 6.1, as 2.15.92.0.2, gcc 3.4.2 per FC3 distro.

GDB fails to display source file and line info for functions in
two different sections in a hand-assembly source file.

A simple test-case that demonstrates the problem follows:

> cat test.S

    .text
.globl foo
foo:
    nop
    
.globl main

#ifdef DIFFERENT_TEXT_SECTION
    .section .text.with.another.name,"ax",@progbits
#endif
main:
    nop


> gcc test.S -Wa,--gdwarf2
> gdb a.out
...
(gdb) b main
Breakpoint 1 at 0x804834f: file test.S, line 13.
(gdb) b foo
Breakpoint 2 at 0x8048347: file test.S, line 5.
(gdb) quit

> gcc test.S -Wa,--gdwarf2 -DDIFFERENT_TEXT_SECTION
> gdb a.out
...
(gdb) b main
Breakpoint 1 at 0x804834f
(gdb) b foo
Breakpoint 2 at 0x8048347
(gdb)


The DWARF .debug_aranges section seems to have enough information
to deal with this, but GDB doesn't use it.

We'd like to find a fix for this. Any enlightenment is appreciated.


Regards,
Ross Morley
Tensilica, Inc.




             reply	other threads:[~2006-05-04  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04  1:23 Ross Morley [this message]
2006-05-04  1:59 ` Daniel Jacobowitz
2006-05-04  9:07   ` Ross Morley
2006-05-04 12:45     ` Daniel Jacobowitz
2006-05-04 18:26       ` Ross Morley

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=44595771.1070907@tensilica.com \
    --to=ross@tensilica.com \
    --cc=gdb@sources.redhat.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