Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
student:stu:gdb [2022/09/14 17:25] – created lam2mostudent:stu:gdb [2023/09/29 15:11] (current) – Remove outdated GDB fix section lam2mo
Line 1: Line 1:
-Unfortunately, the default version of GDB on stu (9.2) has a bug that causes it to stop at an incorrect location at the beginning of functions, before function parameters are fully initialized.+====== GDB on stu ======
  
-To gain access to a newer, fixed version of GDB (10.0) for your account, please run the following command verbatim while logged into stu:+===== GDB + VS Code configuration =====
  
-  echo "source /cs/students/cs261/f22/bashrc>>$HOME/.bashrc +Here is a sample ''launch.json'' file. This one is set up for the CS 261 P0, but you can modify it for any C project by changing "''intro''" to the name of your executable. You can also provide command-line arguments using ''args'' (e.g., for CS 261 P1, you might specify ''[ "-H", "tests/inputs/simple.o]''
-   + 
-**PLEASE COPY AND PASTE THE COMMAND -- DO NOT ATTEMPT TO RE-TYPE IT!!** Every character must be exactly correct for it to workYou will need to log out and back in to get the correct version of GDBYou will know it is working by looking at the version number at the top of the text printed by GDB; it should start with "10.0" not "9.2".+<code> 
 +
 +    // Use IntelliSense to learn about possible attributes. 
 +    // Hover to view descriptions of existing attributes. 
 +    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 
 +    "version": "0.2.0"
 +    "configurations":
 +        { 
 +            "name": "Launch", 
 +            "type": "cppdbg", 
 +            "request": "launch", 
 +            "program": "${workspaceRoot}/intro", 
 +            "args": [""], 
 +            "cwd": ".
 +        } 
 +    ] 
 +
 +</code>