public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/26313] New: [aarch64] GDB doesn't skip prologues properly
@ 2020-07-29 12:35 luis.machado at linaro dot org
  2020-07-29 13:01 ` [Bug gdb/26313] " luis.machado at linaro dot org
  2022-04-09 15:07 ` [Bug tdep/26313] " tromey at sourceware dot org
  0 siblings, 2 replies; 3+ messages in thread
From: luis.machado at linaro dot org @ 2020-07-29 12:35 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 26313
           Summary: [aarch64] GDB doesn't skip prologues properly
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P1
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: luis.machado at linaro dot org
                CC: alan.hayward at arm dot com
  Target Milestone: ---
              Host: aarch64-*
            Target: aarch64-*
             Build: aarch64-*

Using gdb.arch/aarch64-prologue.exp, if we try to insert a breakpoint into
excessiveprologue, it will be inserted midway through the prologue. This is
incorrect.

The correct position should be the branch instruction.

--
(gdb) disass excessiveprologue                                
Dump of assembler code for function excessiveprologue:        
   0x00000000000007cc <+0>:     stp     x29, x30, [sp, #-208]!
   0x00000000000007d0 <+4>:     mov     x29, sp               
   0x00000000000007d4 <+8>:     stp     w0, w1, [sp, #16]     
   0x00000000000007d8 <+12>:    stp     x2, x3, [sp, #24]     
   0x00000000000007dc <+16>:    str     w4, [sp, #40]         
   0x00000000000007e0 <+20>:    str     x5, [sp, #48]         
   0x00000000000007e4 <+24>:    stur    w6, [sp, #52]         
   0x00000000000007e8 <+28>:    stur    x7, [sp, #56]         
   0x00000000000007ec <+32>:    stp     s0, s1, [sp, #64]     
   0x00000000000007f0 <+36>:    stp     d2, d3, [sp, #72]     
   0x00000000000007f4 <+40>:    stp     q4, q5, [sp, #96]     
   0x00000000000007f8 <+44>:    str     b6, [sp, #128]        
   0x00000000000007fc <+48>:    str     h7, [sp, #132]        
   0x0000000000000800 <+52>:    str     s8, [sp, #136]        
   0x0000000000000804 <+56>:    stur    d9, [sp, #140]        
   0x0000000000000808 <+60>:    stur    q10, [sp, #148]       
   0x000000000000080c <+64>:    stur    b11, [sp, #164]       
   0x0000000000000810 <+68>:    stur    h12, [sp, #160]       
   0x0000000000000814 <+72>:    stur    s13, [sp, #172]       
   0x0000000000000818 <+76>:    stur    d14, [sp, #176]       
   0x000000000000081c <+80>:    stur    q15, [sp, #184]       
   0x0000000000000820 <+84>:    bl      0x724 <innerfunc>     
   0x0000000000000824 <+88>:    ldp     w0, w1, [sp, #16]     
   0x0000000000000828 <+92>:    ldp     x2, x3, [sp, #24]     
   0x000000000000082c <+96>:    ldr     w4, [sp, #40]         
   0x0000000000000830 <+100>:   ldr     x5, [sp, #48]         
   0x0000000000000834 <+104>:   ldur    w6, [sp, #52]         
   0x0000000000000838 <+108>:   ldur    x7, [sp, #56]         
   0x000000000000083c <+112>:   ldp     s0, s1, [sp, #64]     
   0x0000000000000840 <+116>:   ldp     d2, d3, [sp, #72]     
   0x0000000000000844 <+120>:   ldp     q4, q5, [sp, #96]     
   0x0000000000000848 <+124>:   ldr     b6, [sp, #128]        
   0x000000000000084c <+128>:   ldr     h7, [sp, #132]        
   0x0000000000000850 <+132>:   ldr     s8, [sp, #136]        
   0x0000000000000854 <+136>:   ldur    d9, [sp, #140]        
   0x0000000000000858 <+140>:   ldur    q10, [sp, #148]       
   0x000000000000085c <+144>:   ldur    b11, [sp, #164]       
   0x0000000000000860 <+148>:   ldur    h12, [sp, #160]       
   0x0000000000000864 <+152>:   ldur    s13, [sp, #172]       
   0x0000000000000868 <+156>:   ldur    d14, [sp, #176]       
   0x000000000000086c <+160>:   ldur    q15, [sp, #184]       
   0x0000000000000870 <+164>:   ldp     x29, x30, [sp], #208  
   0x0000000000000874 <+168>:   ret                           
End of assembler dump.                              
--

(gdb) b excessiveprologue
Breakpoint 1 at 0x804

The correct position should be 0x820.

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

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

* [Bug gdb/26313] [aarch64] GDB doesn't skip prologues properly
  2020-07-29 12:35 [Bug gdb/26313] New: [aarch64] GDB doesn't skip prologues properly luis.machado at linaro dot org
@ 2020-07-29 13:01 ` luis.machado at linaro dot org
  2022-04-09 15:07 ` [Bug tdep/26313] " tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: luis.machado at linaro dot org @ 2020-07-29 13:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Luis Machado <luis.machado at linaro dot org> ---
The problem seems to be the lack of handling of OP_STURV in GDB's aarch64
prologue analyzer.

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

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

* [Bug tdep/26313] [aarch64] GDB doesn't skip prologues properly
  2020-07-29 12:35 [Bug gdb/26313] New: [aarch64] GDB doesn't skip prologues properly luis.machado at linaro dot org
  2020-07-29 13:01 ` [Bug gdb/26313] " luis.machado at linaro dot org
@ 2022-04-09 15:07 ` tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2022-04-09 15:07 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
          Component|gdb                         |tdep

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

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

end of thread, other threads:[~2022-04-09 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 12:35 [Bug gdb/26313] New: [aarch64] GDB doesn't skip prologues properly luis.machado at linaro dot org
2020-07-29 13:01 ` [Bug gdb/26313] " luis.machado at linaro dot org
2022-04-09 15:07 ` [Bug tdep/26313] " tromey at sourceware dot org

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