Bug 15156 - breakpoint on labels in asm statement placed at wrong address
Summary: breakpoint on labels in asm statement placed at wrong address
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: 7.5
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-18 22:01 UTC by philippe.waroquiers
Modified: 2013-02-18 22:01 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
test program with a asm block with a label (154 bytes, text/x-csrc)
2013-02-18 22:01 UTC, philippe.waroquiers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description philippe.waroquiers 2013-02-18 22:01:10 UTC
Created attachment 6875 [details]
test program with a asm block with a label

Tested on Debian 6.0, gcc version 4.4.5 (Debian 4.4.5-8), x86_64-linux-gnu,
gdb 7.5

Compile the attached program with:
gcc -g -o self_invalidate self_invalidate.c

then do:
gdb ./self_invalidate
break top
break *top

The first command puts a breakpoint at another address than the 2nd command.
It is unclear either why the first command is accepted or else
why it puts a breakpoint at another address than the label top.


(gdb) break top
Breakpoint 1 at 0x400499: file self_invalidate.c, line 4.
(gdb) break *top
Breakpoint 2 at 0x40049e: file self_invalidate.c, line 4.
(gdb)