public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/30369] New: [gdb/symtab] False match issue in skip_prologue_using_linetable
@ 2023-04-18  8:32 vries at gcc dot gnu.org
  2023-04-18  8:34 ` [Bug symtab/30369] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-04-18  8:32 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30369
           Summary: [gdb/symtab] False match issue in
                    skip_prologue_using_linetable
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

[ Reported here (
https://sourceware.org/pipermail/gdb-patches/2023-April/198927.html ), without
reproducer. ]

Consider mockup functions foo and bar:
...
00000000004004b2 <foo_label>:
  4004b2:       c7 45 f8 02 00 00 00    movl   $0x2,-0x8(%rbp)

00000000004004b9 <bar_label>:
  4004b9:       c7 45 f4 03 00 00 00    movl   $0x3,-0xc(%rbp)

00000000004004c0 <bar_end>:
...
with line info:
...
INDEX  LINE   REL-ADDRESS        UNREL-ADDRESS      IS-STMT PROLOGUE-END 
0      22     0x00000000004004b2 0x00000000004004b2 Y                    
1      26     0x00000000004004b9 0x00000000004004b9 Y       Y            
2      END    0x00000000004004c0 0x00000000004004c0 Y                    
...

When setting a breakpoint on foo, we get:
...
(gdb) break foo
Breakpoint 1 at 0x4004b9: file $src, line 26.
...
In other words, the breakpoint was set in bar instead.

With the fix from aforementioned patch, we have instead:
...
Breakpoint 1 at 0x4004b2: file $src, line 22.
...

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

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

end of thread, other threads:[~2023-04-22  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18  8:32 [Bug symtab/30369] New: [gdb/symtab] False match issue in skip_prologue_using_linetable vries at gcc dot gnu.org
2023-04-18  8:34 ` [Bug symtab/30369] " vries at gcc dot gnu.org
2023-04-18 10:00 ` vries at gcc dot gnu.org
2023-04-18 12:16 ` vries at gcc dot gnu.org
2023-04-22  5:50 ` cvs-commit at gcc dot gnu.org
2023-04-22  7:33 ` cvs-commit at gcc dot gnu.org
2023-04-22  7:35 ` vries at gcc dot gnu.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).