Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@cgsoftware.com>
To: Paolo Molaro <lupus@ximian.com>
Cc: Andrew Cagney <ac131313@cygnus.com>, <gdb@sources.redhat.com>
Subject: Re: large line number debugging support
Date: Wed, 19 Dec 2001 11:38:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0112191436400.30389-100000@www.cgsoftware.com> (raw)
In-Reply-To: <20011219152007.GG959@lettere.unipd.it>



On Wed, 19 Dec 2001, Paolo Molaro wrote:

> On 12/15/01 Daniel Berlin wrote:
> > > How does dwarf2 go with this?  ``gas -gdwarf2'' will select dwarf2
> > > assembler debug info.
> >
> > DWARF2 can do line numbers as large as you like, the opcodes take leb128
> > or sleb128, as opposed to some fixed size encoding.
>
> Uhm, still no luck:
>
> $ cat test-stabs.s
> .stabs "corlib.il",100,0,0,0
> .stabs "Void:t(0,1)=(0,1)",128,0,0,0
> .stabs "myfunc:F(0,1)",36,0,70000,0x0
> .stabs "",36,0,0,204
>
> $ as -gdwarf2 test-stabs.s -o test-stabs.o
> $ objdump -G test-stabs.o
>
> test-stabs.o:     file format elf32-i386
>
> Contents of .stab section:
>
> Symnum n_type n_othr n_desc n_value  n_strx String
>
> -1     HdrSym 0      4      00000038 1
> 0      SO     0      0      00000000 14     corlib.il
> 1      LSYM   0      0      00000000 24     Void:t(0,1)=(0,1)
> 2      FUN    0      4464   00000000 42     myfunc:F(0,1)
> 3      FUN    0      0      000000cc 0
>
> $ echo $((70000-4464))
> 65536
>
> It's still trucated at 65536. So, even if the information is saved in
> the file (from an hexdump it doesn't look so), it's not used correctly
> by objdump and gdb.
> My binutils version is:
> binutils           2.11.92.0.12.3-3
>
> Maybe I'm just doing something silly?

as -gdwarf-2 would generate line number debug info for the *assembler
source*, not translate your stabs commands into dwarf2 ones.
You need to output dwarf2 info instead of stabs.


      parent reply	other threads:[~2001-12-19 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21 12:33 Paolo Molaro
2001-11-28 10:41 ` Paolo Molaro
2001-12-15 11:36 ` Andrew Cagney
2001-12-15 12:56   ` Daniel Berlin
2001-12-19  7:21     ` Paolo Molaro
2001-12-19  7:26       ` Joel Brobecker
2001-12-19 11:38       ` Daniel Berlin [this message]

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=Pine.LNX.4.33.0112191436400.30389-100000@www.cgsoftware.com \
    --to=dan@cgsoftware.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=lupus@ximian.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