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: Thu, 14 Nov 2013 09:57:00 -0000	[thread overview]
Message-ID: <bug-16157-4717-9RLqme098x@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 #9 from ggs334 <guosheng_gao at realsil dot com.cn> ---
> That's not sufficient, the frame that was frame #0 before the step must be 
> frame #1 after the step for GDB to consider this was a subroutine call.  
> That's this part of the condition:
>
>      && (frame_id_eq (frame_unwind_caller_id (get_current_frame ()),
>		       ecs->event_thread->control.step_stack_frame_id)

> Then I don't understand how that frame_id_eq returned true.  Well, unless 
> both were outer_frame_id.  Please check that.


I have checked it, frame_id_eq() return true, but frame_unwind_caller_id() and
ecs->event_thread->control.step_stack_frame_id are not outer_frame_id.

If frame_unwind_caller_id() can find a valid function address in register $ra,
the returned frame id id equal to 
ecs->event_thread->control.step_stack_frame_id 
and the vlaue is:
struct frame_id
{
  stack_addr=0xffffffff;
  code_addr=0x80001470;//The address of _start(entry point)
  special_addr=0x0;
  stack_addr_p=0x1;
  code_addr_p=0x1;
  special_addr_p=0x0;
  artificial_depth=0x0;
};


If can't find a valid function address in register $ra, GDB will print
============
warning: GDB can't find the start of the function at 0xfffffffc.

    GDB is unable to find the start of the function at 0xfffffffc
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0xfffffffc for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
============

So,I think you are right,maybe something odd in the unwinder. But the unwinder
is foreign for me, Can you give some advices?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From gdb-prs-return-14695-listarch-gdb-prs=sources.redhat.com@sourceware.org Thu Nov 14 16:56:22 2013
Return-Path: <gdb-prs-return-14695-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 32266 invoked by alias); 14 Nov 2013 16:56:22 -0000
Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-prs.sourceware.org>
List-Subscribe: <mailto:gdb-prs-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-prs/>
List-Post: <mailto:gdb-prs@sourceware.org>
List-Help: <mailto:gdb-prs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: gdb-prs-owner@sourceware.org
Delivered-To: mailing list gdb-prs@sourceware.org
Received: (qmail 32225 invoked by uid 48); 14 Nov 2013 16:56:21 -0000
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/15975] info vtbl does not produce any information and  set
 print vtbl on/off has no effect
Date: Thu, 14 Nov 2013 16:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: c++
X-Bugzilla-Version: 7.6
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tromey at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-15975-4717-Q8xsFOWXjK@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-15975-4717@http.sourceware.org/bugzilla/>
References: <bug-15975-4717@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-q4/txt/msg00321.txt.bz2
Content-length: 534

https://sourceware.org/bugzilla/show_bug.cgi?id\x15975

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #1 from Tom Tromey <tromey at redhat dot com> ---
I think this is a compiler bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id7237

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


      parent reply	other threads:[~2013-11-14  9:57 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
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 [this message]

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-9RLqme098x@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).