public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "guosheng_gao at realsil dot com.cn" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/16157] the function get_pc_function_start (CORE_ADDR pc) maybe inaccurate
Date: Wed, 13 Nov 2013 02:49:00 -0000	[thread overview]
Message-ID: <bug-16157-4717-vTchYXDAxT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16157-4717@http.sourceware.org/bugzilla/>

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

--- Comment #6 from ggs334 <guosheng_gao at realsil dot com.cn> ---
> Then I don't understand how that frame_id_eq returned true 
The frame_id_eq return false(eq == 0) according to the following condition:
-----
else if (l.code_addr_p && r.code_addr_p && l.code_addr != r.code_addr)
    /* An invalid code addr is a wild card.  If .code addresses are
       different, the frames are different.  */
    eq = 0;
-----
and I try to delete this code, The problem disappears.

> What's different between lop3 and lop2? 
No different from lop2 and lop3, only 2 labels.

------------------

the next case: when I single step in line 196, program run until exit:

Breakpoint 1, zerobss () at crt0.S:196
196             sw      v0, 0(s0)
(gdb) l
191             nop
192
193             # Tell other cores it's ready
194             li      v0, 1
195             LA      (s0, flag_ready)
196             sw      v0, 0(s0)
197
198     all_wait_1:
199             LA      (s0, flag_ready)
200             lw      v0, 0(s0)
(gdb) l 196
191             nop
192
193             # Tell other cores it's ready
194             li      v0, 1
195             LA      (s0, flag_ready)
196             sw      v0, 0(s0)
197
198     all_wait_1:
199             LA      (s0, flag_ready)
200             lw      v0, 0(s0)
(gdb) set debug infrun 1
(gdb) s
=pc:===ffffffffbfc0012c====
=func start===ffffffffbfc000d8====
infrun: clear_proceed_status_thread (Thread 1)
infrun: proceed (addr=0xffffffff, signal=144, step=1)
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 1]
at 0xbfc0012c
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun:   42000 [Thread 1],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbfc00130
=pc:===ffffffffbfc00130====
=func start===ffffffffbfc00130====
=pc:===ffffffffbfc0011f====
=func start===ffffffffbfc000d8====
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0xbfc00004
infrun: resume (step=0, signal=0), trap_expected=0, current thread [Thread 1]
at 0xbfc00130
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   42000 [Remote target],
infrun:   status->kind = exited, status = 0
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_EXITED
[Inferior 1 (Remote target) exited normally]

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


  parent reply	other threads:[~2013-11-13  2:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12  6:12 [Bug gdb/16157] New: " guosheng_gao at realsil dot com.cn
2013-11-12 11:46 ` [Bug gdb/16157] " palves at redhat dot com
2013-11-12 13:01 ` guosheng_gao at realsil dot com.cn
2013-11-12 13:18 ` guosheng_gao at realsil dot com.cn
2013-11-12 14:29 ` palves at redhat dot com
2013-11-13  2:49 ` guosheng_gao at realsil dot com.cn [this message]
2013-11-13  3:10 ` guosheng_gao at realsil dot com.cn
2013-11-13 10:06 ` palves at redhat dot com
2013-11-14  9:57 ` guosheng_gao at realsil dot com.cn

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-16157-4717-vTchYXDAxT@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).