public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* non-decr_pc_after_break i386 targets
@ 2004-08-14 19:34 Mark Kettenis
  2004-08-14 19:37 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Kettenis @ 2004-08-14 19:34 UTC (permalink / raw)
  To: gdb

While reading the Solaris proc(4) man page I noticed the PR_BPTADJ
flag.  If this flag is set, Solaris x86 "will adjust the program
counter back to location of the breakpointed instructions when the lwp
stops on a breakpoint".  The man page explicitly says that on SPARC
this is a no-op.  Using this flag makes it possible to turn
i386-*-solaris2* into an architecture where decr_pc_after_break is
zero.  This would have remove some of the problems with breakpoints in
signal trampolines on Solaris x86.  So I think we should do that.

However, this also reveals a flaw in the way we handle
decr_pc_after_break.  Currently it's part of the architecture vector,
which essentially means that we consider it part of the ISA.  However,
the above shows that it also depends on the target interface.  So it
seems we should make it possible for the target vector to override the
default set by the architecture vector.

To people agree with this analysis?

Mark

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

* Re: non-decr_pc_after_break i386 targets
  2004-08-14 19:34 non-decr_pc_after_break i386 targets Mark Kettenis
@ 2004-08-14 19:37 ` Eli Zaretskii
  2004-08-16 18:59 ` Kevin Buettner
  2004-08-24 20:33 ` Andrew Cagney
  2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2004-08-14 19:37 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

> Date: Sat, 14 Aug 2004 21:34:04 +0200 (CEST)
> From: Mark Kettenis <kettenis@chello.nl>
> 
> To people agree with this analysis?

I do agree with this.

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

* Re: non-decr_pc_after_break i386 targets
  2004-08-14 19:34 non-decr_pc_after_break i386 targets Mark Kettenis
  2004-08-14 19:37 ` Eli Zaretskii
@ 2004-08-16 18:59 ` Kevin Buettner
  2004-08-24 20:33 ` Andrew Cagney
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2004-08-16 18:59 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

On Sat, 14 Aug 2004 21:34:04 +0200 (CEST)
Mark Kettenis <kettenis@chello.nl> wrote:

> However, this also reveals a flaw in the way we handle
> decr_pc_after_break.  Currently it's part of the architecture vector,
> which essentially means that we consider it part of the ISA.  However,
> the above shows that it also depends on the target interface.  So it
> seems we should make it possible for the target vector to override the
> default set by the architecture vector.
> 
> To people agree with this analysis?

Yes, I agree.

Kevin

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

* Re: non-decr_pc_after_break i386 targets
  2004-08-14 19:34 non-decr_pc_after_break i386 targets Mark Kettenis
  2004-08-14 19:37 ` Eli Zaretskii
  2004-08-16 18:59 ` Kevin Buettner
@ 2004-08-24 20:33 ` Andrew Cagney
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2004-08-24 20:33 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

> While reading the Solaris proc(4) man page I noticed the PR_BPTADJ
> flag.  If this flag is set, Solaris x86 "will adjust the program
> counter back to location of the breakpointed instructions when the lwp
> stops on a breakpoint".  The man page explicitly says that on SPARC
> this is a no-op.  Using this flag makes it possible to turn
> i386-*-solaris2* into an architecture where decr_pc_after_break is
> zero.  This would have remove some of the problems with breakpoints in
> signal trampolines on Solaris x86.  So I think we should do that.
> 
> However, this also reveals a flaw in the way we handle
> decr_pc_after_break.  Currently it's part of the architecture vector,
> which essentially means that we consider it part of the ISA.  However,
> the above shows that it also depends on the target interface.  So it
> seems we should make it possible for the target vector to override the
> default set by the architecture vector.
> 
> To people agree with this analysis?

The same problem pattern occures with software_single_step - the 
archititecture is incorrectly dictating the presence/absence of hardware 
single-step.

Both of these cases are used in infrun.c.  I think, in both cases, the 
logic should read something like:

	if (!target_has_<feature>_p ())
		gdb_assert (gdbarch_<feature-workaround>_p())
		use gdbarch_feature_workaround

Andrew


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

end of thread, other threads:[~2004-08-24 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-14 19:34 non-decr_pc_after_break i386 targets Mark Kettenis
2004-08-14 19:37 ` Eli Zaretskii
2004-08-16 18:59 ` Kevin Buettner
2004-08-24 20:33 ` Andrew Cagney

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).