This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/21526] New: powerpc64: gdb should use local entry point symbol instead of loosely parsing instructions


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

            Bug ID: 21526
           Summary: powerpc64: gdb should use local entry point symbol
                    instead of loosely parsing instructions
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: anton at samba dot org
  Target Milestone: ---

gdb isn't using the local entry point when stepping over the global entry
point. An example:

#include <ppc-asm.h>

.text

FUNC_START(main)
.rept 8
        addpcis r3,0
        ori     r3,r3,0
.endr
        blr
FUNC_END(main)


(gdb) break main
Breakpoint 1 at 0x7c8
(gdb) run
Starting program: /tmp/f 

Breakpoint 1, 0x00000000200007c8 in main ()
(gdb) disassemble 
Dump of assembler code for function main:
   0x0000000020000780 <+0>:     addis   r2,r12,2
   0x0000000020000784 <+4>:     addi    r2,r2,30592
   0x0000000020000788 <+8>:     lnia    r3
   0x000000002000078c <+12>:    ori     r3,r3,0
   0x0000000020000790 <+16>:    lnia    r3
   0x0000000020000794 <+20>:    ori     r3,r3,0
   0x0000000020000798 <+24>:    lnia    r3
   0x000000002000079c <+28>:    ori     r3,r3,0
   0x00000000200007a0 <+32>:    lnia    r3
   0x00000000200007a4 <+36>:    ori     r3,r3,0
   0x00000000200007a8 <+40>:    lnia    r3
   0x00000000200007ac <+44>:    ori     r3,r3,0
   0x00000000200007b0 <+48>:    lnia    r3
   0x00000000200007b4 <+52>:    ori     r3,r3,0
   0x00000000200007b8 <+56>:    lnia    r3
   0x00000000200007bc <+60>:    ori     r3,r3,0
   0x00000000200007c0 <+64>:    lnia    r3
   0x00000000200007c4 <+68>:    ori     r3,r3,0
=> 0x00000000200007c8 <+72>:    blr
End of assembler dump.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]