delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2012/12/13/17:19:45

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX189rDF9LlE9GFvzPaoFvngqpTNHuizxo3r91MWOLg
zDYAmDX1obvc+4
Message-ID: <50CA546F.6020301@gmx.de>
Date: Thu, 13 Dec 2012 23:19:27 +0100
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT gnu DOT org>
CC: djgpp-workers AT delorie DOT com
Subject: Re: RFC: remove deprecated_sym_private
References: <87sj7c9u95 DOT fsf AT fleche DOT redhat DOT com> <83r4mw7x68 DOT fsf AT gnu DOT org> <50C87C50 DOT 3050704 AT gmx DOT de> <83fw3b8cl8 DOT fsf AT gnu DOT org> <50C91E2A DOT 2050809 AT gmx DOT de> <83k3slomws DOT fsf AT gnu DOT org> <50CA2843 DOT 7020603 AT gmx DOT de> <50CA3340 DOT 5050502 AT gmx DOT de> <83a9thofpj DOT fsf AT gnu DOT org>
In-Reply-To: <83a9thofpj.fsf@gnu.org>
X-Y-GMX-Trusted: 0
Reply-To: djgpp-workers AT delorie DOT com

Am 13.12.2012 21:32, schrieb Eli Zaretskii:
>> Date: Thu, 13 Dec 2012 20:57:52 +0100
>> From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
>> CC: Eli Zaretskii <eliz AT gnu DOT org>
>>
>> Sorry, only to clarify the issue.  I have tried to read line numbers from both
>> temacs and emacs but this is only possible if and objdump program is used
>> from bnu217  or previous versions.  As soon as objdump programs from
>> bnu219 or later versions are used, it is no longer possible to show debug
>> info like line numbers if the binary has been compiled with -gcoff.
>> This shows that the coff debug support is seriously broken.
> Hmm... maybe I'm missing something here.  What do you mean by "not
> possible to show debug info like line numbers"?  I have Binutils 2.19
> here, and I do see this:
>
>    { /* 0x15d1 */
>      /* file dispnew.c line 318 addr 0x15d7 */
>      /* file dispnew.c line 322 addr 0x15e7 */
>      /* file dispnew.c line 325 addr 0x15ed */
>      /* file dispnew.c line 326 addr 0x15f5 */
>      /* file dispnew.c line 327 addr 0x15f8 */
>    } /* 0x15fa */
>    static void _free_glyph_matrix (struct _glyph_matrix /* id 77 */ *_matrix /* 0x8 */)
>    { /* 0x15fa */
>      int _i /* 0xfffffffc */;
>      /* file dispnew.c line 344 addr 0x1600 */
>      /* file dispnew.c line 350 addr 0x1606 */
>      /* file dispnew.c line 351 addr 0x1615 */
>      /* file dispnew.c line 354 addr 0x161a */
>      /* file dispnew.c line 355 addr 0x1622 */
>      /* file dispnew.c line 356 addr 0x1634 */
>      /* file dispnew.c line 355 addr 0x165e */
>      /* file dispnew.c line 359 addr 0x1665 */
>      /* file dispnew.c line 360 addr 0x1676 */
>      /* file dispnew.c line 362 addr 0x1684 */
>    } /* 0x1686 */
>    static int _margin_glyphs_to_reserve (struct _window /* id 121 */ *_w /* 0x8 */, int _total_glyphs /* 0xc */, int _margin /* 0x10 */)
>    { /* 0x1686 */
>      int _n /* 0xfffffffc */;
>      int _width /* 0xfffffff8 */;
>      double _d /* 0xfffffff0 */;
>      /* file dispnew.c line 376 addr 0x168c */
>      /* file dispnew.c line 378 addr 0x16a6 */
>      /* file dispnew.c line 379 addr 0x16b2 */
>
> etc.  This is output from
>
>    objdump -g -l temacs.exe
>
> Isn't this line number information?  What am I missing?
>


Sorry, probably we have been using different options for objdump.
I have used all the time this:
    objdump -Sld temacs.exe


1) Output of objdump from bnu219b from /beta directory:

[snip]
00002000 <_new_glyph_matrix>:
     2000:    55                       push   %ebp
     2001:    89 e5                    mov    %esp,%ebp
     2003:    83 ec 28                 sub    $0x28,%esp
     2006:    c7 04 24 4c 02 00 00     movl   $0x24c,(%esp)
     200d:    e8 8e 3b 0f 00           call   f5ba0 <_xmalloc>
     2012:    89 45 f4                 mov    %eax,-0xc(%ebp)
     2015:    c7 44 24 04 4c 02 00     movl   $0x24c,0x4(%esp)
     201c:    00
     201d:    8b 45 f4                 mov    -0xc(%ebp),%eax
     2020:    89 04 24                 mov    %eax,(%esp)
     2023:    e8 78 93 18 00           call   18b3a0 <_bzero>
     2028:    a1 60 98 38 00           mov    0x389860,%eax
     202d:    40                       inc    %eax
     202e:    a3 60 98 38 00           mov    %eax,0x389860
     2033:    8b 45 f4                 mov    -0xc(%ebp),%eax
     2036:    8b 55 08                 mov    0x8(%ebp),%edx
     2039:    89 10                    mov    %edx,(%eax)
     203b:    8b 45 f4                 mov    -0xc(%ebp),%eax
     203e:    c9                       leave
     203f:    c3                       ret
[snip]


2) Output of objdump from bnu217b from /beta directory:

[snip]
00002000 <_new_glyph_matrix>:
_new_glyph_matrix():
dispnew.c:521



/***********************************************************************
                 Glyph Matrices
  ***********************************************************************/

/* Allocate and return a glyph_matrix structure.  POOL is the glyph
    pool from which memory for the matrix should be allocated, or null
    for window-based redisplay where no glyph pools are used.  The
    member `pool' of the glyph matrix structure returned is set to
    POOL, the structure is otherwise zeroed.  */

struct glyph_matrix *
new_glyph_matrix (pool)
      struct glyph_pool *pool;
{
     2000:    55                       push   %ebp
     2001:    89 e5                    mov    %esp,%ebp
     2003:    83 ec 28                 sub    $0x28,%esp
dispnew.c:525
   struct glyph_matrix *result;

   /* Allocate and clear.  */
   result = (struct glyph_matrix *) xmalloc (sizeof *result);
     2006:    c7 04 24 4c 02 00 00     movl   $0x24c,(%esp)
     200d:    e8 8e 3b 0f 00           call   f5ba0 <_xmalloc>
     2012:    89 45 f4                 mov    %eax,0xfffffff4(%ebp)
dispnew.c:526
   bzero (result, sizeof *result);
     2015:    c7 44 24 04 4c 02 00     movl   $0x24c,0x4(%esp)
     201c:    00
     201d:    8b 45 f4                 mov    0xfffffff4(%ebp),%eax
     2020:    89 04 24                 mov    %eax,(%esp)
     2023:    e8 78 93 18 00           call   18b3a0 <_bzero>
dispnew.c:530

   /* Increment number of allocated matrices.  This count is used
      to detect memory leaks.  */
   ++glyph_matrix_count;
     2028:    a1 60 98 38 00           mov    0x389860,%eax
     202d:    40                       inc    %eax
     202e:    a3 60 98 38 00           mov    %eax,0x389860
dispnew.c:533

   /* Set pool and return.  */
   result->pool = pool;
     2033:    8b 45 f4                 mov    0xfffffff4(%ebp),%eax
     2036:    8b 55 08                 mov    0x8(%ebp),%edx
     2039:    89 10                    mov    %edx,(%eax)
dispnew.c:534
   return result;
     203b:    8b 45 f4                 mov    0xfffffff4(%ebp),%eax
dispnew.c:535
}
     203e:    c9                       leave
     203f:    c3                       ret
[snip]



There is no difference in this behaviour if I use the versions compiled
with djdev203.

You are right.  If I use -g -l options then both versions bnu217 and
bnu219 produce the same output as you have posted.  I have assumed that
to judge about the quality of the debug info produced with -gcoff option
it should be necessary that objdump should be able to assign assembler
code to source code lines.  That is the reason why I have used the -Sld option.
This assumption may  have been wrong.


Regards,
Juan M. Guerrero

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019