2019.11.28.pdf - Quote of the Day ‣"If at first you don't succeed call it version 1.0 •Anonymous 1 Announcements ‣ Please complete class

2019.11.28.pdf - Quote of the Day ‣"If at first you don't...

This preview shows page 1 - 16 out of 56 pages.

Quote of the Day "If at first you don't succeed; call it version 1.0" •Anonymous 1
Image of page 1
Announcements Please complete class evaluation Results of poll: two Q&A sessions on December 16, morning and afternoon Assignment 3 •portions of source code useful? Assignment 4 •extension 2
Image of page 2
git any questions on the git demos? 3
Image of page 3
Quick review … 4
Image of page 4
Debugging Techniques interactive debugger; e.g. gdb principles developed with adb , dbx , gdb now present in most IDEs •version 8.3 on tuxworld man gdb , help within gdb , or •refcard quite useful compile with -g option for symbol table and other debugging information 5
Image of page 5
Debugging Techniques interactive debugger; e.g. gdb •stack trace - core files: memory dump @ time of program termination - use debugger to find out where a crash occurred which calls have been made, their order, and their parameters - example: gdb_cmds_1.* in buggy_queens memory addresses (e.g. value of argv and argv[0] ) could vary from that shown in gdb_cmds_1.* 6
Image of page 6
On to new material … 7
Image of page 7
Debugging Techniques interactive debugger; e.g. gdb •program being examined is in a separate process from gdb 8 gdb buggy_queens
Image of page 8
Debugging Techniques interactive debugger; e.g. gdb •trace execution - watch points, break points - step through code, see what happens - display variables, memory locations - example: gdb_cmds_2.* in buggy_queens difference between step and next - step : execute until another line reached if the next line is within a called function, execution stops there - next : execute next line, including any function calls function calls that appear within the line of code are executed without stopping within the function 9
Image of page 9
Debugging Techniques interactive debugger; e.g. gdb difference between display and watch - display : show value of expr each time program stops - watch : set a watchpoint for expression expr •example: gdb_cmds_3.* in buggy_queens - memory addresses (e.g. value of toRet ) could vary from that shown in gdb_cmds_3.* 10
Image of page 10
Debugging Techniques interactive debugger; e.g. gdb •many other features - e.g. checkpoints (only on some O/S), conditional breakpoints •advantages: - program structure problems are hard to see using DEBUG/print - an interactive debugger can refocus your mind to see what's happening, not what you think is happening •disadvantages? 11
Image of page 11
Shell Programming Introduction •Model Variables •Variable Expansion and Quoting Debugging Processing Structure Simple I/O Complex Commands 12
Image of page 12
Shell Programming Introduction •Model Variables •Variable Expansion and Quoting Debugging Simple I/O Complex Commands 13
Image of page 13
Quick review … 14
Image of page 14
15 Common Representational Form Use idea of data as stream of bytes: UNIX files Use text as common representational form •allows for extensive set of tools •not compact, but hardly an issue •human readable!
Image of page 15
Image of page 16

You've reached the end of your free preview.

Want to read all 56 pages?

  • Spring '14

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors