Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Instrukcja Użytkownika Strona 18

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 24
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 17
14 Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools
3.3. Run the Executable
To run the program, use the following example:
./hello
The program generates
hello world!
3 + 4 = 7
and returns when the program exits.
3.4. Debug the Executable
To start GDB, use the following commands:
gdb hello
After the initial copyright and configuration information, GDB returns its own prompt, (gdb). The
following is a sample debugging session:
1. To set a breakpoint, type:
break main
The following output displays:
Breakpoint 1 at 0x132: file hello.c, line 15.
Note the exact address and line number may vary, depending upon the target architecture being
debugged and the exact layout of the C code in the hello.c file.
2. To run the program, type:
run
The following output displays (when the program stops at a breakpoint):
Starting program: hello
Breakpoint 1, main () at hello.c:15
15 a = 3;
Again note that the exact line number and instruction displayed is dependent upon the source
code layout.
3. To print the value of variable, a, type:
print a
The following output displays:
$1 = 0
4. To execute the next command, type next:
next
The following output displays:
16 b = 4;
5. To display the value of a again, type:
print a
The following output displays:
$2 = 3
6. To display the program being debugged, type:
list
Przeglądanie stron 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 24

Komentarze do niniejszej Instrukcji

Brak uwag

Cideko AVK-02 Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Tastaturen Cideko AVK-02.
Wir stellen 1 PDF-Handbücher Cideko AVK-02 zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Datenblatt


Cideko AVK-02 Datenblatt (1 Seiten)


Marke: Cideko | Kategorie: Keyboards | Größe: 0.86 MB |

 

Inhaltsverzeichnis





Weitere Produkte und Handbücher für Tastaturen Cideko

Modelle Dokumententyp
AVK-08-BK Datenblatt   Cideko AK08, 1 Seiten