aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--.vs/cst116-ch5-debugging-AllTheNamesAreTaken3141/v17/.suobin0 -> 14336 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidxbin0 -> 16644 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/read.lock0
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suobin0 -> 36352 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.dbbin0 -> 16457728 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shmbin0 -> 32768 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-walbin0 -> 2218352 bytes
-rw-r--r--CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipchbin0 -> 40501248 bytes
-rw-r--r--CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp18
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlogbin0 -> 998 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlogbin0 -> 20402 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlogbin0 -> 964 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CST116-Ch5-Debugging.lastbuildstate2
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlogbin0 -> 1864 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlogbin0 -> 3720 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlogbin0 -> 1044 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exebin0 -> 72704 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe.recipe11
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilkbin0 -> 772152 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.log2
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.objbin0 -> 90899 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdbbin0 -> 1560576 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.vcxproj.FileListAbsolute.txt1
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/vc143.idbbin0 -> 166912 bytes
-rw-r--r--CST116-Ch5-Debugging/x64/Debug/vc143.pdbbin0 -> 462848 bytes
26 files changed, 38 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a3204dd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+################################################################################
+# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
+################################################################################
+
+*.opendb
diff --git a/.vs/cst116-ch5-debugging-AllTheNamesAreTaken3141/v17/.suo b/.vs/cst116-ch5-debugging-AllTheNamesAreTaken3141/v17/.suo
new file mode 100644
index 0000000..ab6d695
--- /dev/null
+++ b/.vs/cst116-ch5-debugging-AllTheNamesAreTaken3141/v17/.suo
Binary files differ
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
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/FileContentIndex/cc90c2d8-440f-4c54-825e-ebecc88f51bb.vsidx
Binary files 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
--- /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
new file mode 100644
index 0000000..d9ac342
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/.suo
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-shm
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/Browse.VC.db-wal
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/.vs/CST116-Ch5-Debugging/v17/ipch/AutoPCH/297f38d34e94890b/CST116-CH5-DEBUGGING.ipch
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.command.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.read.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/CL.write.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.command.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.read.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-C.656289ce.tlog/link.write.1.tlog
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.exe
Binary files 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 @@
+<?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
new file mode 100644
index 0000000..85e965c
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.ilk
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.obj
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/CST116-Ch5-Debugging.pdb
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/vc143.idb
Binary files 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
--- /dev/null
+++ b/CST116-Ch5-Debugging/x64/Debug/vc143.pdb
Binary files differ