Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: threads PREPARE_TO_PROCEED patch
Date: Sat, 15 Mar 2003 20:51:00 -0000	[thread overview]
Message-ID: <20030315205139.GA16167@nevyn.them.org> (raw)
In-Reply-To: <200303152039.h2FKdEnO000331@elgar.kettenis.dyndns.org>

On Sat, Mar 15, 2003 at 09:39:14PM +0100, Mark Kettenis wrote:
>    Date: Fri, 14 Mar 2003 13:35:29 -0500
>    From: Daniel Jacobowitz <drow@mvista.com>
> 
>    > I'm not quite sure whether changing the gdbarch default is a good
>    > idea, but replacing lin_lwp_prepare_to_proceed with
>    > generic_prepare_to_proceed has been the intention all along.
> 
>    Well, let me describe the problem I'm trying to solve; I'd like your
>    opinion on how to approach it.  When using gdbserver, we need to have
>    generic_prepare_to_proceed.  Not the lin_lwp version, and not the
>    "default" one from arch-utils.  The former won't work and the latter
>    doesn't do enough.  So cross debuggers need to pick this up.
> 
> OK, but generic_prepare_to_proceed() is perfectly usable on a native
> GNU/Linux GDB too, isn't it?

Yes, exactly.

>    Note that this is a property of the target.  Not of the architecture. 
>    I'm not sure PREPARE_TO_PROCEED belongs in gdbarch at all.  It's only
>    defined by Mach3, HP/UX, and Linux; it's undefined for x86-64-linux
>    (why???).  I could set it in all the Linux gdbarch init functions that
>    I care about, but that doesn't seem like much of a solution.
> 
> It seems to be a property of the OS to me.  In its current
> incarnation, gdbarch does includes details of both the architecture
> (ISA) and the OS (OS/ABI).  So gdbarch seems to be the correct place
> for PREPARE_TO_PROCEED to me.  So yes, I think you should add it to
> all relevant Linux gdbarch init functions.

I can do that; I'll put a patch together.

But I must admit that I don't really agree.  It seems to be a property
of the threads implementation for the target instead. Consider this
case: if someone wanted to write a remote protocol stub for HP/UX. 
They wouldn't want the HP/UX version of PREPARE_TO_PROCEED naturally,
since that's native-only.  They'd want most likely
generic_prepare_to_proceed.  The default function isn't useful; it
doesn't support switching threads correctly.

(Incidentally, from reading the HP/UX implementation, I believe that
using generic_prepare_to_proceed would work there too.  It wouldn't
work for the Mach 3.0 implementation as-is but I think it could be made
to work.  I'm not volunteering; are either hppa*-*-osf* or
mips*-*-mach3* still living?  Perhaps we should deprecate them next
release.)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-03-15 20:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13 23:32 Daniel Jacobowitz
2003-03-14 17:20 ` Mark Kettenis
2003-03-14 18:35   ` Daniel Jacobowitz
2003-03-15 20:39     ` Mark Kettenis
2003-03-15 20:51       ` Daniel Jacobowitz [this message]
2003-03-16 21:24         ` Andrew Cagney
2003-05-26 19:57           ` Andrew Cagney
2003-05-26 20:05             ` 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=20030315205139.GA16167@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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