LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-26-2013, 02:48 AM   #1
jinxin16897123
LQ Newbie
 
Registered: Aug 2011
Location: Shanghai,China
Posts: 9

Rep: Reputation: Disabled
How tot read registers in terminal


Hi, there
I want to known if there is a way to read registers through hexdump&/dev/mem,
Thank you very much.
 
Old 07-27-2013, 01:39 AM   #2
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Rep: Reputation: 26
You mean CPU registers? /dev/mem is an image of the computer's main memory, so that's not what you're looking for. You can read the contents of CPU registers using a debugger such as gdb, or you can write a program in assembly that will output register contents on the terminal.
 
1 members found this post helpful.
Old 07-27-2013, 12:23 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It would really be pointless to look at CPU registers from the shell level. By the time you saw the values, they would have changed a gzillion times. If you are talking about seeing the values of memory mapped IO registers, or IO-space registers of x86 CPUs, then you should be able to write a simple program that uses the /dev/mem or /dev/port facility, and call it from a shell commandline. That would require root privileges.
A debugger such as gdb will expose such data as moo-cow has already pointed out.
--- rod.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dump SDIO commands (Buffers/blocks and registers Read/Write) lightydo Linux - Hardware 0 11-06-2012 07:42 AM
how to read cpu registers values from shell? yossibs Linux - Newbie 3 12-27-2009 06:19 AM
Convert e2fs tot e3fs mijohnst Linux - Software 1 12-01-2005 12:05 AM
How to read contents of CPU registers? irfanhab Programming 1 12-28-2004 08:04 AM
The RealTek chip appears to be active, so some registers will not be read. thep Linux - Networking 0 02-09-2003 11:41 PM


All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration