diff options
| author | Joseph Williams <[email protected]> | 2022-09-29 15:49:41 -0700 |
|---|---|---|
| committer | Joseph Williams <[email protected]> | 2022-09-29 15:49:41 -0700 |
| commit | cf309ce9d5410ec1361f72491c36782364fe636f (patch) | |
| tree | 574705d3d55dc54e124b688f4ac3060bdd06c54a /CST116-Ch5-Debugging | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-ch5-debugging-allthenamesaretaken3141-main.tar.xz cst116-ch5-debugging-allthenamesaretaken3141-main.zip | |
Diffstat (limited to 'CST116-Ch5-Debugging')
24 files changed, 33 insertions, 1 deletions
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 Binary files differnew file mode 100644 index 0000000..f53b40e --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx 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 --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/read.lock diff --git a/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo Binary files differnew file mode 100644 index 0000000..d9ac342 --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo 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 Binary files differnew file mode 100644 index 0000000..8513d6e --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db 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 Binary files differnew file mode 100644 index 0000000..70bbf62 --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm 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 Binary files differnew file mode 100644 index 0000000..2a85ed9 --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal 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 Binary files differnew file mode 100644 index 0000000..aa1391c --- /dev/null +++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch 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 Binary files differnew file mode 100644 index 0000000..ac1d228 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog 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 Binary files differnew file mode 100644 index 0000000..433c8c4 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog 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 Binary files differnew file mode 100644 index 0000000..c1d6f14 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog 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 Binary files differnew file mode 100644 index 0000000..deaae7a --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog 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 Binary files differnew file mode 100644 index 0000000..f464feb --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog 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 Binary files differnew file mode 100644 index 0000000..572c0a1 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe Binary files differnew file mode 100644 index 0000000..e93bc2e --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <ProjectOutputs> + <ProjectOutput> + <FullPath>C:\Users\hey-t\Source\Repos\cst116-ch5-debugging-AllTheNamesAreTaken3141\CST116-Ch5-Debugging\x64\Debug\CST116-Ch5-Debugging.exe</FullPath> + </ProjectOutput> + </ProjectOutputs> + <ContentFiles /> + <SatelliteDlls /> + <NonRecipeFileRefs /> +</Project>
\ 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 Binary files differnew file mode 100644 index 0000000..85e965c --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk 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 Binary files differnew file mode 100644 index 0000000..709e286 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj diff --git a/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb Binary files differnew file mode 100644 index 0000000..f5a5809 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb 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 Binary files differnew file mode 100644 index 0000000..b591e03 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/vc143.idb diff --git a/CST116-Ch5-Debugging/x64/Debug/vc143.pdb b/CST116-Ch5-Debugging/x64/Debug/vc143.pdb Binary files differnew file mode 100644 index 0000000..05e2b29 --- /dev/null +++ b/CST116-Ch5-Debugging/x64/Debug/vc143.pdb |