public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@red-bean.com>
To: "Newman, Sarah R" <sarah.r.newman@lmco.com>
Cc: Daniel Jacobowitz <drow@false.org>, gdb@sources.redhat.com
Subject: Re: single stepping mips remote programs built with gcc 4.0
Date: Wed, 23 Nov 2005 00:50:00 -0000	[thread overview]
Message-ID: <8f2776cb0511221620s66ba1d98y8e012785a1665c0c@mail.gmail.com> (raw)
In-Reply-To: <5990BE666D0436419054489CDD9D505409EE88F5@emss01m10.us.lmco.com>

It might be worth pointing out:

> (gdb) step
> Sending packet: $m80001998,4#70...Ack
> Packet received: 27bdffe8
> Sending packet: $M80001998,4:0005000d#43...Ack
> Packet received: OK
> Sending packet: $m800019b0,4#91...Ack
> Packet received: 03e00008
> Sending packet: $M800019b0,4:0005000d#64...Ack
> Packet received: OK
> Sending packet: $s#73...Ack
> Packet received: S05

You've talked about GDB inserting breakpoints for software
single-stepping, but you're not using software single-stepping here. 
Those memory writes are for your user breakpoints at the entry point
and exit point of main.  The 's' packet indicates that the stub itself
is doing the single-stepping.

> Sending packet: $m8000199c,4#9b...Ack
> Packet received: afbf0010
> Sending packet: $m800019a0,4#90...Ack
> Packet received: 0c000664
> Sending packet: $m800019a4,4#94...Ack
> Packet received: 00000000

This is weird.  It looks like GDB is doing some prologue analysis
here, but it's not starting at any function's entry point.  That,
combined with the fact that you said that disassembly shows you the
wrong code, makes me wonder if the debug info is right.

When you say 'print &a' or 'print &main', do you get the right addresses?

  parent reply	other threads:[~2005-11-23  0:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22  5:26 Newman, Sarah R
2005-11-22 19:24 ` Daniel Jacobowitz
2005-11-23  0:50 ` Jim Blandy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-23  3:09 Newman, Sarah R
2005-11-22 20:00 Newman, Sarah R
2005-11-22 19:48 Newman, Sarah R
2005-11-17 22:39 Newman, Sarah R
2005-11-17 22:48 ` Daniel Jacobowitz
2005-11-17 20:13 Newman, Sarah R
2005-11-17 20:23 ` 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=8f2776cb0511221620s66ba1d98y8e012785a1665c0c@mail.gmail.com \
    --to=jimb@red-bean.com \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=sarah.r.newman@lmco.com \
    /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).