public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "aburgess at broadcom dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug cli/12444] disassemble /m errors on inlined code?
Date: Mon, 10 Oct 2011 12:43:00 -0000	[thread overview]
Message-ID: <bug-12444-4717-mivJNObIHf@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12444-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=12444

--- Comment #3 from Andrew Burgess <aburgess at broadcom dot com> 2011-10-10 12:42:43 UTC ---
Created attachment 5971
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5971
Another example of this issue.

I have another test that is failing I believe for the same underlying cause,
though the failure is slightly different in this case. In this test a single
merged.c file includes foo.c and bar.c. If I try to disassemble with source
code functions from foo.c or bar.c then no source lines are found/printed.

To run the test,

$ tar -xjvf merged-test-2.tar.bz2
$ cd merged-test-2
$ make test
Testing merged files...
gdb -x cmds.gdb merged.x
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/andrew/merge-file-issue/merged-test-2/merged.x...done.
+disassemble /m main
Dump of assembler code for function main:
   0x080483b4 <+0>:    push   %ebp
   0x080483b5 <+1>:    mov    %esp,%ebp
   0x080483b7 <+3>:    and    $0xfffffff0,%esp
   0x080483ba <+6>:    call   0x80483c3 <function>
   0x080483bf <+11>:    mov    %ebp,%esp
   0x080483c1 <+13>:    pop    %ebp
   0x080483c2 <+14>:    ret    
End of assembler dump.
+disassemble /m function
Dump of assembler code for function function:
   0x080483c3 <+0>:    push   %ebp
   0x080483c4 <+1>:    mov    %esp,%ebp
   0x080483c6 <+3>:    mov    $0x5,%eax
   0x080483cb <+8>:    pop    %ebp
   0x080483cc <+9>:    ret    
End of assembler dump.
+quit
Testing unmerged files...
gdb -x cmds.gdb unmerged.x
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/andrew/merge-file-issue/merged-test-2/unmerged.x...done.
+disassemble /m main
Dump of assembler code for function main:
3    {
   0x080483c0 <+0>:    push   %ebp
   0x080483c1 <+1>:    mov    %esp,%ebp
   0x080483c3 <+3>:    and    $0xfffffff0,%esp

4      return function ();
   0x080483c6 <+6>:    call   0x80483b4 <function>

5    }
   0x080483cb <+11>:    mov    %ebp,%esp
   0x080483cd <+13>:    pop    %ebp
   0x080483ce <+14>:    ret    

End of assembler dump.
+disassemble /m function
Dump of assembler code for function function:
3    {
   0x080483b4 <+0>:    push   %ebp
   0x080483b5 <+1>:    mov    %esp,%ebp

4      return 5;
   0x080483b7 <+3>:    mov    $0x5,%eax

5    }
   0x080483bc <+8>:    pop    %ebp
   0x080483bd <+9>:    ret    

End of assembler dump.
+quit


In the first case ("Testing merged files...") the disassembly for "main" and
"function" contain no source lines. In the second case ("Testing unmerged
files...") the disassembly for "main" and "function" do contain the source
lines.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2011-10-10 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 19:42 [Bug cli/12444] New: " mjw at redhat dot com
2011-01-26 19:50 ` [Bug cli/12444] " mjw at redhat dot com
2011-10-10 12:30 ` aburgess at broadcom dot com
2011-10-10 12:43 ` aburgess at broadcom dot com [this message]
2013-10-24  4:15 ` a3at.mail at gmail dot com
2015-08-15  4:53 ` xdje42 at gmail dot com

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=bug-12444-4717-mivJNObIHf@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).