9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Edouard Klein <edou@rdklein.fr>
To: 9fans <9fans@9fans.net>
Subject: [9fans] Inferno: starting a process in a stopped state
Date: Mon, 22 Jul 2024 10:21:46 +0200	[thread overview]
Message-ID: <87bk2p3k86.fsf@rdklein.fr> (raw)

Hi !

I'm writing dis assembly, and I would like to debug my program right
from the entrypoint.

I intend to use the /prog filesystem for that, thanks to which one can
stop a program by echoing "stop" to dbgctl file.

However, what I need to do is stop the program at the very start.

I have multiple ideas, such as introducing a sleep or a read that would
let me enough time to stop the program, but they have the bad property
of modifying the program.

I could create a loader program that would exec the target program and
stop the loader right before the exec, and I suspect (but I'm not sure)
that would let me stop the target program.

But these all sound very rube goldbergy to me.

Is there a way to start a program in a stopped state that I have
overlooked ?

Thanks in advance,

Cheers,

Edouard.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T4297f451b18d599a-Md3642db0bae45288d5553df6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

             reply	other threads:[~2024-07-22  8:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22  8:21 Edouard Klein [this message]
2024-07-24 19:52 ` ron minnich
2024-08-03 14:03   ` Edouard Klein
2024-08-04 13:37     ` Edouard Klein
2024-08-04 14:26       ` Edouard Klein

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=87bk2p3k86.fsf@rdklein.fr \
    --to=edou@rdklein.fr \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).