CPSC 355 Lecture Notes - Lecture 9: Mediacorp, Gnu Debugger, Punched Tape

129 views4 pages

Document Summary

Cpsc 355 - lecture 9 - sept 30th. } else { c = a + b; d = c + 5; c = a b; d = c 5; In assembly cmp a_r, b_r b. le else define(a_r, x19) define(b_r, x20) define(c_r, x21) define(d_r, x22) else: next: statement after if-else construct add c_r, a_r, b_r add d_r, c_r, 5 c_r, a_r, b_r sub sub d_r, c_r, 5 b next. To start a program under debugger control, use: gdb myprogram. To set a breakpoint, type: b label: eg: b main. Use r to run your program: will stop at the first breakpoint. Use c to continue to the next breakpoint: or to the end of the program, of no other breakpoints. To single step through your program, use: si. But if a function call, proceeds until the function returns: use display/i to automatically show the current instruction when single stepping.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents