From: Dan Towner <dant@picochip.com>
To: gdb@sources.redhat.com
Subject: The value of inferior_ptid for remote debugging targets
Date: Tue, 08 Oct 2002 10:30:00 -0000 [thread overview]
Message-ID: <3DA31691.5090207@picochip.com> (raw)
Hi all,
I am porting gdb so that it can be used to debug remote debugging
targets, which are embedded processors. gdb communicates with the
remote target using a monitor program, running on the same machine as
gdb. Gdb invokes the monitor program using `serial_open', and uses pipes
to communicate with it.
I am encountering a problem when I try to use watchpoints. Whenever I
set a watchpoint, the variable goes out of scope immediately I begin
continuing the program being debugged. I have determined that the cause
is the following code, which appears in blockframe.c:reinit_frame_cache
/* FIXME: The inferior_ptid test is wrong if there is a corefile. */
if (PIDGET (inferior_ptid) != 0)
{
select_frame (get_current_frame (), 0);
}
The inferior_ptid is 0 when this is called, hence the current frame is
never selected. This in turn means that the current scope cannot be
determined, and hence watchpoints don't work.
What is the correct value of inferior_ptid for remote targets, and why
shouldn't the above code be called when a remote target is active?
Should the inferior_ptid be setup so that the above code doesn't fail?
any help greatly appreciated...
dan.
=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589
next reply other threads:[~2002-10-08 17:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-08 10:30 Dan Towner [this message]
2002-10-08 10:36 ` Daniel Jacobowitz
2002-10-08 10:54 ` Dan Towner
2002-10-08 11:13 ` Daniel Jacobowitz
2002-10-11 17:51 ` core file Satya
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=3DA31691.5090207@picochip.com \
--to=dant@picochip.com \
--cc=gdb@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