Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the purpose of software debugging in computer network

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "what is the purpose of software debugging in the computer network". The content is easy to understand and clear, hoping to help you solve your doubts. Let the editor lead you to study and learn the article "what is the purpose of software debugging in the computer network".

The purpose of software debugging is to correct errors. Software debugging is a process of testing and correcting syntax and logic errors by manual or compiled program before putting the program into actual operation; it is an indispensable step to ensure the correctness of the computer information system.

The operating environment of this tutorial: windows7 system, Dell G3 computer.

The purpose of software debugging is to correct errors.

The concept of software debugging

Software debugging generally refers to the process of reproducing the software defect problem, locating and finding the source of the problem, and finally solving the problem. Software debugging is usually defined in two different ways:

Definition 1:

The purpose of software debugging is to find and eliminate errors in the software program, and the execution process of the debugged program can be controlled in some way, so as to view and modify the execution state of the debugged program at any time. In this definition, software testing is part of software debugging, similar to the definition of debugging in the Oxford Dictionary. Debugging in the Oxford Dictionary is defined as "the process of identifying and troubleshooting errors in computer hardware or software."

Definition 2:

Debugging is what you need to do after performing a successful test. The so-called successful test means that it can prove that the program does not achieve the desired function. Debugging consists of two steps, starting after a successful test case is executed and the problem is found; the first step is to determine the exact nature and location of the suspicious error in the program; and the second step is to modify the error. In this definition, software testing is separated from debugging work.

The connotation of Software debugging

Software debugging is a process in which the compiled program is tested by manual or compiled program before it is put into actual operation to correct syntax and logic errors. This is an indispensable step to ensure the correctness of the computer information system. When a computer program is finished, it must be sent to the computer for testing. According to the errors found during the test, further diagnosis, find out the cause and the specific location to correct.

The term debugging may mean many different things, but most literally, it means removing errors, exceptions, and bug from your code. Now, there are many ways to do this. For example, you can scan your code for input errors or debug using a code analyzer. You can debug your code using the performance analyzer. Alternatively, you can use the debugger for debugging.

The basic process of software debugging

According to definition 1, the basic process of software system debugging is as follows:

Use the editing program to send the source program to the computer according to a certain writing format, and the editing program will add, delete or modify the source program according to the intention of the user.

Translate the input source program into machine language, that is, use the compiler to check the syntax of the source program and translate the source program statements that conform to the syntax rules into a "language" that the computer can recognize. If checked by the compiler and found to have syntax errors, you must use the editor to correct the syntax errors in the source program, and then compile until there are no syntax errors.

Use the connection program in the computer to connect the translated computer language program and support it into a program that the computer can really run. In the process of connection, there is generally no connection error. If there is a connection error, it indicates that there are some problems in the source program, such as chaotic call of subroutine or parameter transfer error. At this time, we have to use the editing program to modify the source program, and then compile and connect, and so on repeatedly, until there are no connection errors.

After the trial calculation of the modified program, several simulation data can be assumed to run, and the output results can be compared with the correct results of manual processing. If there is any difference, it indicates that there is a logic error in the computer program. If the program is small, you can use manual methods to simulate the computer to modify and deal with these data of the source program; if the program is relatively large, manual simulation obviously does not work, so the computer can only be set to execute step by step. step by step to track the running of the program. Once you find the problem, you still need to use the editor to modify the source program, and then compile, connect, and execute until there are no logic errors. You can also compile after you finish.

According to definition 2, the basic process of software system debugging is as follows:

Reproduce problems: reproduce problems found in software testing

Problem location: determine the location of the program segment where the problem may occur

Find the cause: analyze the relevant code to determine the underlying cause of the defect problem

Design: propose a solution to the problem of software defects

Modify code: modify program code according to the design plan

Validation and validation: review, analysis, and testing techniques are used to determine whether errors have been excluded and whether new errors have been introduced.

The above six steps are iterated until the problem is solved. The basic process of software debugging is shown in figure 1:

In these steps, the problem location and finding the cause is the key link of software debugging, and its workload accounts for more than 90% of the total workload. Software debugging is a time-consuming, laborious and skillful work. At present, there are many researches on problem location in software debugging.

As we can see, the process of defining one is more suitable for our daily development and testing work, while the process of defining second is more suitable for our testing, especially for dealing with problems found after software release or launch.

Basic characteristics of software debugging

Extensive relevance

Debuggers are required to have strong basic computer knowledge (including operating systems, development languages, tools, etc.) and proficient in business problem domain knowledge.

It is difficult.

From the "broad relevance", we can see that it is not very difficult. Of course, it also depends on the specific problems we are facing and the quality of the debugging personnel.

It is difficult to estimate the completion time

This time is really impossible to predict unless the domain experts of a problem are familiar with the overall architecture and code of the software.

Software debugging classification

Classified according to the system environment of the debugging target: software debugging under Windows, software debugging under Linux, software debugging under Dos, etc.

According to the way the target code is executed:

Script-script Debugger

The program that executes the compilation:

Compile to intermediate code first, and then dynamically compile to object code that can be executed by the current CPU at run time (such as .NET programs developed by C #)-managed debugging

Programs that are compiled and linked directly to the object code (Candlestick +)-local debugging

Mixed debugging with both of the above two

According to the execution mode of the object code: user mode debugging (User Mode Debugging), kernel mode debugging (Kernel Mode Debugging)

In multitasking operating systems such as Windows, as a fundamental measure to ensure security and order, the system defines two execution modes, namely, low privilege level user mode (User Mode) and high privilege level kernel mode (Kernel Mode).

The application code runs in user mode, and the operating system kernel, executor, and most device drivers run in kernel mode.

According to the stage of the software: development debugging, production debugging (the dividing line is the official release of the product)

According to the relative position of the debugger and the debugging target: the local machine, ah, Haas, remote debugging

According to the activity of debugging targets: active target debugging, dump file debugging

The above is all the contents of the article "what is the purpose of software debugging in the computer network". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report