Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
student:stu:gdb [2022/09/14 17:30] – Make gdb fix not 261-specifc lam2mostudent:stu:gdb [2022/09/28 11:14] – [GDB + VS Code configuration] Add more details lam2mo
Line 5: Line 5:
 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. 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.
  
-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:+To gain access to a newer, [[https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ac4a4f1cd7dceeeb17d0b8c077c874f2247acbf0|fixed]] version of GDB (10.0) for your account, please run the following command verbatim while logged into stu:
  
   echo "export PATH=/opt/gdb/bin:$PATH" >>$HOME/.bashrc   echo "export PATH=/opt/gdb/bin:$PATH" >>$HOME/.bashrc
Line 17: Line 17:
 ===== GDB + VS Code configuration ===== ===== GDB + VS Code configuration =====
  
-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:+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" ]''.
  
 <code> <code>