01:198:211 Lecture 8: Debugging and more Numerics

75 views2 pages

Document Summary

Cs211-lecture 7-debugging and more numerics: debugging, the make command creates an object file based on what the makefile dictates. Generally, the object file is based off of your program code. To run the object file, input . /[file_name], followed by whatever command line argument you want to send to the program: alternatively, one can compile the code through gcc, like: gcc [file_name. c] This results in an a. out file, which functions similarly to a object file in how you run it. Examples are: -g: adds additional debugging information, -fsanitize=address: if there is a memory leak, the output from a. out will contain information regarding it, -wall: enable all compiler warning messages, valgrind is software that inspects code for us. Prior to running gdb, you must create an a. out file using gcc: next, run the command: gdb a. out. Afterwards, simply input run into the command line, and the program will run until it reaches a segmentation fault or similar error.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents