Note 1. Establish a learning environment

xiaoxiao2021-03-06  20

I have already read the idea of ​​reading Linux source code, but there is no action. There are also several reasons for this.

One is that the LINUX elective course opened in the school did not choose, so I missed an opportunity to force myself to contact Linux. At that time, I also thought about self-study, just for a long time in order to install Linux, and sometimes I used to use it for a few times, I have a problem, and I don't know how to solve it, so I gave up.

It is the environment for reading the code. I didn't know (maybe it's not that time?) SourceInsight This tool existence. And I think about the amount of code that is in contact with it, so I feel that there is no shortage. Later, I knew this stuff, I started to read the impulse of Linux source code. However, this impulse is stifled because the file name under Windows is not case sensitive, so, downloading the Linux source package, unzipping, always reporting a repetitive file, as a perfectionist, this feeling is very Ok, I always feel wrong.

Now finally learn to study hard, every day. (Study life, lying up every day? Hehe)

Due to the problem of learning habits, sometimes I still like some things, so I have opened this classification in this blog, this article, even if a preface, huh, huh.

There is a good environment before starting learning. As mentioned earlier, SourceInsight is good, but can only be used in Windows, and the fatal weakness of Windows is not case sensitive. So you can conclude, read Linux source code, it is best to be below Linux.

The problem with the file name is solved, but it seems that there is no weapon. So, I started looking for the process of weapons.

I want to find a weapon that Sun Da Sheng is a weapon. It also spends a job. Oh, it's far away. The words retired, or talk about the process of finding weapons.

Initially on Google as a "Linux SourceInsight" as a keyword search, the results saw a few posts saying that CSCope Vim or Emaces is a nice similar environment. So I want to try this first. However, it is found that configuring Vim and Emaces are more troublesome. The key is also the experience under Linux. It doesn't time to study this. I want to find the weapon of the name, so I gave up this road.

Let's talk about Debian first. I have always heard that Debian is a very good release version of Linux, and is not commercial. Really used to know it. In particular, the following Apt-Get command, installation software is so convenient, most common software has Debian's distribution version. Therefore, this automatic installation process is really cool. As for why it is to mention it, because when I installed CSCope, I saw the APT prompt and said that CBROWSER was recommended. Then I search on Google, I found that this thing looks like a good look, belongs to the front-end graphical interface of CSCope. Therefore, the second weapon is this.

CBROWSER This stuff is really easy to use. But I finally didn't choose it, mainly is not used to it. Although this stuff is a front-end graphical interface of CSCope, it is necessary to build a cross-index database or a way of a CSCope command line. In addition, this CBROWSER is not used to it because it has no file selection interface. I have used SourceInsight to know that there is an interface that can choose a file and browsing directly. Can CBROWSER seems to remember the file name, and then you can get it, this is more trouble ... After giving up the above two programs, you started the process of finding. As a result, I found a stuff called Source Navigator.

This thing is Red Hat, the name and the introduction look good, so I will use it. As a result, a fatal weakness of this thing was discovered, it was too slow, and the generated database file was too big. For example, I build a source Navigator's Project for Linux 2.4.18 source code, and those database files occupy the capacity of nearly 2G hard drives ... so they can only give up.

The next step is the legendary LXR. The whole name is "Linux Cross-Reference". Look at the people on the forum say it seems very good look, look carefully, discovery is a web-based stuff. That is to use the Apache's web service, plus its Perl scripts, and make a database for the source code directory tree, then you can access in a web way. Just, this stuff is a bit trouble, I follow the instructions, but some index functions are still not prepared, and this thing is based on web way, not to do a grammatical color, so it doesn't look very comfortable.

Later, I finally found a stuff that seems to be called .. Kscope. Look at the name, you know that this stuff is definitely one leg. I have searched online, and it is another CSCope front-end graphical interface. This thing is for KDE, so it is called Kscope. This thing doesn't have a debian installation package, so I have to go my lower source code and then configure-> make-> make install. Although this process is not very cool, it is often encountered, but it is finally solved, this thing ran.

I used it, I feel good, at least very much like SourceInsight, this is very good for people who have been accustomed to life under WINDOWS.

About Debian installation (including the installation of common software) and Kscope installation, write next time, there is still a lot of things to do today, busy busy.

转载请注明原文地址:https://www.9cbs.com/read-40473.html

New Post(0)