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 breakpoints/12703] New: Different function breakpoints are setat same pc address.


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

           Summary: Different function breakpoints are set at same pc
                    address.
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: terry.guo@arm.com
            Target: ARM EABI


Created attachment 5686
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5686
Test case for this bug.

I built a tool chain for ARM EABI from the recent code in trunk. When I try to
set breakpoints for two different functions, I saw GDB set the two breakpoints
at the same PC.

terguo01@terry-pc01:~/work/gdb-bp-issue$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/home/terguo01/tmp/install/bin/../libexec/gcc/arm-none-eabi/4.7.0/lto-wrapper
Target: arm-none-eabi
Configured with: /home/hudson/workspace/UpstreamDailyBuild/combined/configure
--prefix=/home/hudson/workspace/UpstreamDailyBuild/install
--enable-checking=release --disable-gdbtk --disable-werror --disable-tui
--disable-rda --disable-sid --disable-utils --disable-lto
--target=arm-none-eabi
--with-headers=/home/hudson/workspace/UpstreamDailyBuild/combined/newlib/libc/include
--with-newlib --disable-libmudflap --enable-languages=c,c++
Thread model: single
gcc version 4.7.0 20110424 (experimental) (GCC) 

terguo01@terry-pc01:~/work/gdb-bp-issue$ arm-none-eabi-gcc -mthumb -march=armv7
-mfix-cortex-m3-ldrd -Os -ffunction-sections -fdata-sections -MD -std=c99 -Wall
-pedantic bp.c

terguo01@terry-pc01:~/work/gdb-bp-issue$ arm-none-eabi-gdb a.out 
GNU gdb (GDB) 7.3.50.20110424-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/terguo01/work/gdb-bp-issue/a.out...done.
(gdb) b fault_isr 
Breakpoint 1 at 0x8174
(gdb) b reset_isr 
Note: breakpoint 1 also set at pc 0x8174.
Breakpoint 2 at 0x8174

The output of objdump are:

00008160 <fault_isr>:
    8160:    e7fe          b.n    8160 <fault_isr>
    ...

00008164 <reset_isr>:
    8164:    4a05          ldr    r2, [pc, #20]    ; (817c <reset_isr+0x18>)
    8166:    4b06          ldr    r3, [pc, #24]    ; (8180 <reset_isr+0x1c>)
    8168:    4906          ldr    r1, [pc, #24]    ; (8184 <reset_isr+0x20>)
    816a:    e003          b.n    8174 <reset_isr+0x10>
    816c:    f852 0b04     ldr.w    r0, [r2], #4
    8170:    f843 0b04     str.w    r0, [r3], #4
    8174:    428b          cmp    r3, r1
    8176:    d3f9          bcc.n    816c <reset_isr+0x8>
    8178:    e7fe          b.n    8178 <reset_isr+0x14>
    817a:    bf00          nop
    817c:    00012420     .word    0x00012420
    8180:    00012424     .word    0x00012424
    8184:    00012320     .word    0x00012320

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


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