public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "terry.guo at arm dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/12703] New: Different function breakpoints are set at same pc address.
Date: Tue, 26 Apr 2011 03:22:00 -0000	[thread overview]
Message-ID: <bug-12703-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-04-26  3:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26  3:22 terry.guo at arm dot com [this message]
2011-04-26  3:33 ` [Bug breakpoints/12703] " terry.guo at arm dot com
2011-04-26  3:34 ` terry.guo at arm dot com
2011-05-06  4:17 ` qiyao at gcc dot gnu.org
2011-10-13  8:17 ` cvs-commit at gcc dot gnu.org
2011-10-13  8:24 ` qiyao at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12703-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).