From cf309ce9d5410ec1361f72491c36782364fe636f Mon Sep 17 00:00:00 2001 From: Joseph Williams Date: Thu, 29 Sep 2022 15:49:41 -0700 Subject: Finished. Debuggers are weird. --- .../cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx | Bin 0 -> 16644 bytes .../CST116-Ch5-Debugging/FileContentIndex/read.lock | 0 .../.vs/CST116-Ch5-Debugging/v17/.suo | Bin 0 -> 36352 bytes .../.vs/CST116-Ch5-Debugging/v17/Browse.VC.db | Bin 0 -> 16457728 bytes .../.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm | Bin 0 -> 32768 bytes .../.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal | Bin 0 -> 2218352 bytes .../297f38d34e94890b/CST116-CH5-DEBUGGING.ipch | Bin 0 -> 40501248 bytes CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp | 18 +++++++++++++++++- .../Debug/CST116-C.656289ce.tlog/CL.command.1.tlog | Bin 0 -> 998 bytes .../x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog | Bin 0 -> 20402 bytes .../x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog | Bin 0 -> 964 bytes .../CST116-Ch5-Debugging.lastbuildstate | 2 ++ .../Debug/CST116-C.656289ce.tlog/link.command.1.tlog | Bin 0 -> 1864 bytes .../Debug/CST116-C.656289ce.tlog/link.read.1.tlog | Bin 0 -> 3720 bytes .../Debug/CST116-C.656289ce.tlog/link.write.1.tlog | Bin 0 -> 1044 bytes .../x64/Debug/CST116-Ch5-Debugging.exe | Bin 0 -> 72704 bytes .../x64/Debug/CST116-Ch5-Debugging.exe.recipe | 11 +++++++++++ .../x64/Debug/CST116-Ch5-Debugging.ilk | Bin 0 -> 772152 bytes .../x64/Debug/CST116-Ch5-Debugging.log | 2 ++ .../x64/Debug/CST116-Ch5-Debugging.obj | Bin 0 -> 90899 bytes .../x64/Debug/CST116-Ch5-Debugging.pdb | Bin 0 -> 1560576 bytes ...CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt | 1 + CST116-Ch5-Debugging/x64/Debug/vc143.idb | Bin 0 -> 166912 bytes CST116-Ch5-Debugging/x64/Debug/vc143.pdb | Bin 0 -> 462848 bytes 24 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/read.lock create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal create mode 100644 CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CST116-Ch5-Debugging.lastbuildstate create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe.recipe create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.log create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb create mode 100644 CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt create mode 100644 CST116-Ch5-Debugging/x64/Debug/vc143.idb create mode 100644 CST116-Ch5-Debugging/x64/Debug/vc143.pdb (limited to 'CST116-Ch5-Debugging') diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx new file mode 100644 index 0000000..f53b40e Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx differ diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/read.lock b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo new file mode 100644 index 0000000..d9ac342 Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo differ diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db new file mode 100644 index 0000000..8513d6e Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db differ diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm new file mode 100644 index 0000000..70bbf62 Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm differ diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal new file mode 100644 index 0000000..2a85ed9 Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal differ diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch new file mode 100644 index 0000000..aa1391c Binary files /dev/null and b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch differ diff --git a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp index 851932d..8e8bfd7 100644 --- a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp +++ b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp @@ -16,6 +16,9 @@ * the current line being that cout statement, Step Into again. * 6) What happened? Where are we now? What is all of this nasty * looking code? +* +* I'm gonna be honest here, I have no idea what the "nasty looking code" you're talking about is, unless its the lines about "the thread [number] has exited with code [number]", which doesn't look all that nasty to me. +* * 7) Remember, stepping into a predefined routine takes you to the * code for that routine. If the debugger can't find the code it * will show the assembly code for that routine. @@ -25,6 +28,9 @@ * line. * 10) Step over the next cout statement. Now look at the console * window. What was printed? +* +* Assuming we're both looking in the same place, "The thread 0x367c has exited with code 0 (0x0).", which doesn't look all that nasty to me. I'm no expert, but "code 0" definitely feels too short for an error code. +* * 11) Select Stop Debugging either from the Debug menu or from your * toolbar. * @@ -38,11 +44,20 @@ * 5) Notice that the current line of execution is now at the * calculation. * 6) Look at your watch. What is the value of money? +* +* 123.45 +* * 7) Hover your mouse pointer over raise. What is its value? +* +* 0.1 +* * 8) Step over the calculation. Notice the watch on money is now * red. This designates that the variable just changed its value. * 9) What happened to our money? I thought a raise was supposed * to increase our money? Stop debugging and fix the calculation. +* +* Inputting 0.1 for raise causes it to return 10% of money, instead of money + 10%. Just add 1 to raise before calculating. Also, "money *= (1 + raise)" is significantly more readable than "money = money (1 + raise)". +* * * Debugging Exercise 3 * @@ -73,10 +88,11 @@ int main() // Breakpoint 1 // Put a breakpoint on the following line + cout << "Enter percent raise: "; cin >> raise; - money = money * raise; + money *= (raise + 1); cout << "After your raise you have $"; cout << money << endl; diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog new file mode 100644 index 0000000..ac1d228 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog new file mode 100644 index 0000000..433c8c4 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog new file mode 100644 index 0000000..c1d6f14 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CST116-Ch5-Debugging.lastbuildstate b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CST116-Ch5-Debugging.lastbuildstate new file mode 100644 index 0000000..d4d0071 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CST116-Ch5-Debugging.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0: +Debug|x64|C:\Users\hey-t\Source\Repos\cst116-ch5-debugging-AllTheNamesAreTaken3141\CST116-Ch5-Debugging\| diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog new file mode 100644 index 0000000..deaae7a Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog new file mode 100644 index 0000000..f464feb Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog new file mode 100644 index 0000000..572c0a1 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe new file mode 100644 index 0000000..e93bc2e Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe.recipe b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe.recipe new file mode 100644 index 0000000..8d4cc24 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\hey-t\Source\Repos\cst116-ch5-debugging-AllTheNamesAreTaken3141\CST116-Ch5-Debugging\x64\Debug\CST116-Ch5-Debugging.exe + + + + + + \ No newline at end of file diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk new file mode 100644 index 0000000..85e965c Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.log b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.log new file mode 100644 index 0000000..ecaaa45 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.log @@ -0,0 +1,2 @@ + CST116-Ch5-Debugging.cpp + CST116-Ch5-Debugging.vcxproj -> C:\Users\hey-t\Source\Repos\cst116-ch5-debugging-AllTheNamesAreTaken3141\CST116-Ch5-Debugging\x64\Debug\CST116-Ch5-Debugging.exe diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj new file mode 100644 index 0000000..709e286 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb new file mode 100644 index 0000000..f5a5809 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb differ diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..36d892e --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\hey-t\Source\Repos\cst116-ch5-debugging-AllTheNamesAreTaken3141\CST116-Ch5-Debugging\x64\Debug\CST116-Ch5-Debugging.exe diff --git a/CST116-Ch5-Debugging/x64/Debug/vc143.idb b/CST116-Ch5-Debugging/x64/Debug/vc143.idb new file mode 100644 index 0000000..b591e03 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/vc143.idb differ diff --git a/CST116-Ch5-Debugging/x64/Debug/vc143.pdb b/CST116-Ch5-Debugging/x64/Debug/vc143.pdb new file mode 100644 index 0000000..05e2b29 Binary files /dev/null and b/CST116-Ch5-Debugging/x64/Debug/vc143.pdb differ -- cgit v1.2.3