public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/12317] New: mixed disassemble does not work for a function in included file
@ 2010-12-15 19:31 anemo at mba dot ocn.ne.jp
  2015-08-15  4:50 ` [Bug symtab/12317] " xdje42 at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: anemo at mba dot ocn.ne.jp @ 2010-12-15 19:31 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: mixed disassemble does not work for a function in
                    included file
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned@sourceware.org
        ReportedBy: anemo@mba.ocn.ne.jp


If a function body was in included file, disassemble with /m option does not
work.

--- foo.c ---
#include "foo2.c"
int main(int argc, char **argv)
{
    int a = foo2(argc);
    return a;
}
--- foo2.c ---
int foo2(int x)
{
    return x + 1;
}
---

$ gcc -o foo -g foo.c
$ gdb ./foo
GNU gdb (GDB) 7.2.50.20101214-cvs
...
(gdb) disassemble /m main
Dump of assembler code for function main:
...
4        int a = foo2(argc);
   0x08048390 <+17>:    mov    (%ecx),%eax
   0x08048392 <+19>:    mov    %eax,(%esp)
   0x08048395 <+22>:    call   0x8048374 <foo2>
   0x0804839a <+27>:    mov    %eax,-0x8(%ebp)
...
End of assembler dump.
(gdb) disassemble /m foo2
Dump of assembler code for function foo2:
End of assembler dump.
(gdb) disassemble foo2
Dump of assembler code for function foo2:
   0x08048374 <+0>:    push   %ebp
   0x08048375 <+1>:    mov    %esp,%ebp
   0x08048377 <+3>:    mov    0x8(%ebp),%eax
   0x0804837a <+6>:    add    $0x1,%eax
   0x0804837d <+9>:    pop    %ebp
   0x0804837e <+10>:    ret    
End of assembler dump.
(gdb) list foo2
1    int foo2(int x)
2    {
3        return x + 1;
4    }

Normal disassemble command and list command works fine, but mixed disassemble
command does not work.

-- 
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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug symtab/12317] mixed disassemble does not work for a function in included file
  2010-12-15 19:31 [Bug symtab/12317] New: mixed disassemble does not work for a function in included file anemo at mba dot ocn.ne.jp
@ 2015-08-15  4:50 ` xdje42 at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: xdje42 at gmail dot com @ 2015-08-15  4:50 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=12317

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |xdje42 at gmail dot com
         Resolution|---                         |FIXED

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
This works with trunk, though I don't know which patch fixed it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-15  4:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 19:31 [Bug symtab/12317] New: mixed disassemble does not work for a function in included file anemo at mba dot ocn.ne.jp
2015-08-15  4:50 ` [Bug symtab/12317] " xdje42 at gmail dot com

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).