DOC PREVIEW
Software Engineering for Systems Hackers DRAFT: Do not redistribute!

This preview shows page 1-2-3-4-26-27-28-54-55-56-57 out of 57 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

IntroductionRevision ControlRevision Control ConceptsA practical introduction to SubversionResolving conflictsThoughts on using revision controlOther source control systemsTrying it out on your ownRecommended ReadingBuild Tools and AutomationWhich make?Automate some testsWriting MakefilesA more complete exampleToolsTools for Code CheckingCompiler ChecksCatching Errors Early with -D_FORTIFY_SOURCECatching Errors Early with glibc variablesDebuggingA Debugging MindsetGood old printf done better: Debug macrosDebugging toolsgdbUsing GDB to track down common problemsSystem call tracing: ktrace, strace, and friendsMemory Debugging with ValgrindMemory Debugging with Electric FenceTracing packets with tcpdump and WiresharkExamining outputDebugging other people's codeDocumentation and StyleStyleRead other code!CommunicationFurther ReadingUseful Software ComponentsCommand line parsersHints for Configuration FilesScriptingWhich Language?One-linersThe ShellOther useful tools``Scripting'' languages go well beyondA Ruby PrimerProgram DesignDesign for Incremental HappinessDesign for TestabilityAn Adversarial MindsetTest AutomationRecommended ReadingCoding TricksHuman FactorsTime ManagementPlanning and EstimatingAn Attitude for Software DevelopmentProgram Deliberately!Fix bugs earlyTeam DynamicsStructuring code to work as a teamStructuring your development environment for team workStructuring your personal interactionEditorsEmacs TipsTagsIntegrated Development EnvironmentsRecommended ResourcesSoftware Engineering for Systems HackersDRAFT: Do not redistribute!David G. AndersenContents1 Introduction 52 Revision Control 72.1 Revision Control Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 A practical introduction to Subversion . . . . . . . . . . . . . . . . . . . . . . . . 92.2.1 Resolving conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3 Thoughts on using revision control . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 Other source control systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5 Trying it out on your own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.6 Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Build Tools and Automation 153.0.1 Which make? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.0.2 Automate some tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1 Writing Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2 A more complete example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Tools 194.1 Tools for Code Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.1 Compiler Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.2 Catching Errors Early with -D_FORTIFY_SOURCE . . . . . . . . . . . . 194.1.3 Catching Errors Early with glibc variables . . . . . . . . . . . . . . . . . . 195 Debugging 215.1 A Debugging Mindset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.2 Good old printf done better: Debug macros . . . . . . . . . . . . . . . . . . . . . 235.3 Debugging tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.1 gdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.2 Using GDB to track down common problems . . . . . . . . . . . . . . . . 265.3.3 System call tracing: ktrace, strace, and friends . . . . . . . . . . . . . . . 265.3.4 Memory Debugging with Valgrind . . . . . . . . . . . . . . . . . . . . . . 275.3.5 Memory Debugging with Electric Fence . . . . . . . . . . . . . . . . . . . 285.3.6 Tracing packets with tcpdump and Wireshark . . . . . . . . . . . . . . . . 295.3.7 Examining output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.4 Debugging other people’s code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3036 Documentation and Style 316.0.1 Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.1 Read other code! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.2 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.3 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Useful Software Components 357.1 Command line parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.2 Hints for Configuration Files . . . …


Software Engineering for Systems Hackers DRAFT: Do not redistribute!

Download Software Engineering for Systems Hackers DRAFT: Do not redistribute!
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Software Engineering for Systems Hackers DRAFT: Do not redistribute! and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Software Engineering for Systems Hackers DRAFT: Do not redistribute! 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?