kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ablacktshirt@gmail.com (walkerlala)
To: kernelnewbies@lists.kernelnewbies.org
Subject: can anyone tell me which function to call to pause the kernel
Date: Wed, 18 May 2016 12:53:52 +0800	[thread overview]
Message-ID: <573BF560.8050509@gmail.com> (raw)
In-Reply-To: <62324.1463498506@turing-police.cc.vt.edu>

On 2016?05?17? 23:21, Valdis.Kletnieks at vt.edu wrote:
> On Tue, 17 May 2016 20:29:12 +0800, walkerlala said:
>
>> Can I just disable interrupts from hardwares? I know that, at the very
>> beginning, the kernel disable interrupt for convenient. So I wonder
>> whether we can do thing like this.
>
> Sure you can do that.
>
> But then, how do you get the kernel's attention?
>
>>
>> Put it in another way:
>> 	when we "interact" with a Linux Desktop, there are also many programs
>> running underneath as daemons, but we can still do our own works without
>> even noting their existing. So I wonder, is there a similar way that we
>> can use to interact with the kernel (without using a debugger) ?
>
> Try this:
>
> Start up Xorg and your preferred window manager.
>
> Open an xterm or a Gnome-terminal or whatever.
>
>  From that window, try to attach gdb to the Xorg process:
>
> %  ps ax|grep Xorg
>    1791 tty2     S+    69:42 /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/967/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -verbose 3
>   62036 pts/0    S+     0:00 grep Xorg
> % gdb -p 1791
>
> What happens?
>
> Why does it happen?
>
> Eventually, you'll figure out what Xorg and the kernel have in common here....
>


	Ok after trying what you said, I think I understand what you mean 
eventually. I try to use gdb to attach the window manager, which happen 
to be Compiz on my machine, then the whole GUI block. The only thing 
that I can see being able to react is the cursor(honestly I don't 
understand why the cursor can move....)
	This is my reasoning:
	when I attach gdb to Compiz, the window manager block, thus not being 
able to serving. The same with the kernel. If I block the kernel, then 
it would not be able to serve.....
	Is this what you mean ?

	So I have to wait for the kernel to finish and prompt me a console ?
	Actually, I am willing to do so, but I just can't get the raw kernel to 
run at Qemu. That is the reason why I tried to block the kernel......
	Any idea ?

Regards,

      reply	other threads:[~2016-05-18  4:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 14:55 can anyone tell me which function to call to pause the kernel walkerlala
2016-05-12 15:26 ` François
2016-05-15 17:36 ` Mulyadi Santosa
     [not found]   ` <57391618.7090506@gmail.com>
2016-05-17 11:41     ` Mulyadi Santosa
2016-05-17 12:29       ` walkerlala
2016-05-17 15:21         ` Valdis.Kletnieks at vt.edu
2016-05-18  4:53           ` walkerlala [this message]

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=573BF560.8050509@gmail.com \
    --to=ablacktshirt@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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).