From: "Newman, Mark (N-Superior Technical Resource Inc)" <mark.newman@lmco.com>
To: gdb-patches@sources.redhat.com
Subject: FW: bug ????
Date: Fri, 15 Aug 2003 16:55:00 -0000 [thread overview]
Message-ID: <F56FBA314E8E5A41895F0DA8F6716A6D02A416@EMSS04M11.us.lmco.com> (raw)
-----Original Message-----
From: Michael Snyder [mailto:msnyder@redhat.com]
Sent: Thursday, August 14, 2003 4:16 PM
To: Newman, Mark (N-Superior Technical Resource Inc)
Subject: Re: bug ????
Newman, Mark (N-Superior Technical Resource Inc) wrote:
>Michael -
>
>I am not certain how to handle this. Perhaps you can give me some
>insight. I am not familar with GDB internals.
>
>I appears that the the following is not working correctly in
>trace_dump_command
>
> /* The current frame is a trap frame if the frame PC is equal
> to the tracepoint PC. If not, then the current frame was
> collected during single-stepping. */
>
> stepping_frame = (t->address != read_pc ());
>
>The trace address is one less than the read_pc address (I am not
>stepping). Either gdbserver needs to adjust the register set so that
>the pc is back by one or some adjustment needs to be made to t->address
>so it looks at the next address. Should the tracepoint look at the
>state prior to executing the instruction at the address or after the
>instruction is executed?
>
Ah, this is the old DECR_PC_AFTER_BREAK problem. I never
ran into it because I never had tracepoints working on an x86 target
(just about the only one left where it's an issue.
Try this:
stepping_frame = (t->address != (read_pc () - DECR_PC_AFTER_BREAK);
The macro should evaluate to zero if the pc points to the trap
instruction, and
to (sizeof(trap_instruction) if it points past the trap.
If this works, why don't you submit it as a patch to gdb-patches?
Cheers,
Michael
next reply other threads:[~2003-08-15 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-15 16:55 Newman, Mark (N-Superior Technical Resource Inc) [this message]
2003-08-15 18:21 ` Michael Snyder
2003-08-21 15:28 ` Andrew Cagney
2003-08-21 18:10 ` Michael Snyder
2003-08-21 15:40 Newman, Mark (N-Superior Technical Resource Inc)
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=F56FBA314E8E5A41895F0DA8F6716A6D02A416@EMSS04M11.us.lmco.com \
--to=mark.newman@lmco.com \
--cc=gdb-patches@sources.redhat.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