Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* The value of inferior_ptid for remote debugging targets
@ 2002-10-08 10:30 Dan Towner
  2002-10-08 10:36 ` Daniel Jacobowitz
  2002-10-11 17:51 ` core file Satya
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Towner @ 2002-10-08 10:30 UTC (permalink / raw)
  To: gdb

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-12  0:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 10:30 The value of inferior_ptid for remote debugging targets Dan Towner
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox