From: Colin MacDonald <colin_mac2002@yahoo.co.uk>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: Unable to step over functions in arm-elf binary
Date: Thu, 22 Feb 2007 19:26:00 -0000 [thread overview]
Message-ID: <76964.36169.qm@web26713.mail.ukl.yahoo.com> (raw)
OK, so I have a breakpoint on a line that calls a function. When I hit the breakpoint the backtrace shows this:
#0 CPlatform::RunTestSuite (this=0x207ffb4) at Common/Platform.cpp:113
#1 0x01017db0 in main (argc=17253984, argv=0x0) at OtherFiles/Main.cpp:37
This is fine so far. Line 113 of platform.cpp calls a function called vs_status. If I stepi until I first hit vs_status I get the following as the backtrace:
#0 vs_status (pInBuf=0x0) at Common/PlatformIO.cpp:149
#1 0x00000000 in ?? ()
Doesn't look happy. If I execute another stepi then pInBuf is picked up. Another few stepi instructions then fills in the backtrace properly:
#0 vs_status (pInBuf=0x207ffb4 "Ôé\006\001\224Ù\006\001ØV\a\001¬\r")
at Common/PlatformIO.cpp:153
#1 0x010034f8 in CPlatform::RunTestSuite (this=0x207ffb4)
at Common/Platform.cpp:113
#2 0x01017db0 in main (argc=17253984, argv=0x0) at OtherFiles/Main.cpp:37
which seems fine.
The code in the region of line 2401 in infrun.c:
if (!frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id)
&& frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
{
should
determine whether or not we have stepped into a subroutine and, if so,
will go on to set a breakpoint at the caller's location in the desired
way. The frame_id_eq call is returning zero, however, so I don't get
the breakpoint. With frame debug on I get a pile of stuff the
culminates in:
{ frame_id_eq (l={!stack,!code,!special},r={stack=0x207ff68,code=0x10032dc,!special}) -> 0 }
which
makes me think that get_current_frame is returning something
unexpected. Certainly if I bypass the above test then I get a failure
assertion in
insert_step_resume_breakpoint_at_caller (get_current_frame ());
I've tried building with -mapcs-frame but it doesn't seem to make any difference. And that's me into guesswork now.
Colin MacDonald
----- Original Message ----
From: Daniel Jacobowitz <drow@false.org>
To: Colin MacDonald <colin_mac2002@yahoo.co.uk>
Cc: gdb@sourceware.org
Sent: Thursday, 22 February, 2007 1:12:59 PM
Subject: Re: Unable to step over functions in arm-elf binary
On Thu, Feb 22, 2007 at 12:56:04PM +0000, Colin MacDonald wrote:
> I'm using GDB / Insight 6.5. First attempts with 6.6 appear to show the same behaviour.
>
> I updated my remote serial server to support $vCont packets as well as the basic $c and $s packets but no joy.
I recommend you single step (using stepi) to the first instruction of
a function you can't "next" over, and try "backtrace". If it's wrong,
that's your problem. Keep stepi'ing a bit until you're into the
function body.
Another thing that may be helpful is "set debug infrun 1".
--
Daniel Jacobowitz
CodeSourcery
___________________________________________________________
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
next reply other threads:[~2007-02-22 16:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-22 19:26 Colin MacDonald [this message]
2007-02-23 0:10 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2007-02-22 16:46 Colin MacDonald
2007-02-22 16:50 ` Daniel Jacobowitz
2007-02-22 12:56 Colin MacDonald
2007-02-22 13:13 ` Daniel Jacobowitz
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=76964.36169.qm@web26713.mail.ukl.yahoo.com \
--to=colin_mac2002@yahoo.co.uk \
--cc=drow@false.org \
--cc=gdb@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