launch.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. "configurations": [
  3. {
  4. "type": "cppdbg",
  5. "request": "launch",
  6. "name": "Launch Kernel (riscv64)",
  7. "program": "${workspaceFolder}/build/kernel.sym",
  8. "args": [],
  9. "stopAtEntry": false,
  10. "cwd": "${workspaceFolder}",
  11. "environment": [],
  12. "externalConsole": false,
  13. "MIMode": "gdb",
  14. "miDebuggerPath": "/Users/david/.local/riscv64-unknown-elf-gcc-8.3.0-2020.04.1-x86_64-apple-darwin/bin/riscv64-unknown-elf-gdb",
  15. "miDebuggerServerAddress": "127.0.0.1:1234",
  16. "setupCommands": [
  17. {
  18. "text": "-enable-pretty-printing",
  19. "description": "Enable GDB pretty printing",
  20. "ignoreFailures": true
  21. },
  22. {
  23. "text": "-exec set output-radix 16",
  24. "description": "Print addresses in hexadecimal",
  25. "ignoreFailures": true
  26. },
  27. // {
  28. // "text": "source ${workspaceFolder}/pretty-print.py",
  29. // "description": "Load GDB pretty printers",
  30. // "ignoreFailures": false
  31. // },
  32. ],
  33. "preLaunchTask": "debug run riscv64",
  34. "postDebugTask": "kill qemu riscv64"
  35. },
  36. {
  37. "type": "cppdbg",
  38. "request": "launch",
  39. "name": "Launch Kernel (x86_64)",
  40. "program": "${workspaceFolder}/build/kernel.sym",
  41. "args": [],
  42. "stopAtEntry": false,
  43. "cwd": "${workspaceFolder}",
  44. "environment": [],
  45. "externalConsole": false,
  46. "MIMode": "gdb",
  47. "miDebuggerPath": "x86_64-elf-gdb",
  48. "miDebuggerServerAddress": "127.0.0.1:1234",
  49. "setupCommands": [
  50. {
  51. "text": "-enable-pretty-printing",
  52. "description": "Enable GDB pretty printing",
  53. "ignoreFailures": true
  54. },
  55. {
  56. "text": "-exec set output-radix 16",
  57. "description": "Print addresses in hexadecimal",
  58. "ignoreFailures": true
  59. },
  60. // {
  61. // "text": "source ${workspaceFolder}/pretty-print.py",
  62. // "description": "Load GDB pretty printers",
  63. // "ignoreFailures": false
  64. // },
  65. ],
  66. "preLaunchTask": "debug run x86_64",
  67. "postDebugTask": "kill qemu x86_64"
  68. },
  69. {
  70. "type": "cppdbg",
  71. "request": "launch",
  72. "name": "Attach Kernel (x86_64)",
  73. "program": "${workspaceFolder}/build/kernel.sym",
  74. "args": [],
  75. "stopAtEntry": false,
  76. "cwd": "${workspaceFolder}",
  77. "environment": [],
  78. "externalConsole": false,
  79. "MIMode": "gdb",
  80. "miDebuggerPath": "x86_64-elf-gdb",
  81. "miDebuggerServerAddress": "127.0.0.1:1234",
  82. "setupCommands": [
  83. {
  84. "text": "-enable-pretty-printing",
  85. "description": "Enable GDB pretty printing",
  86. "ignoreFailures": true
  87. },
  88. {
  89. "text": "-exec set output-radix 16",
  90. "description": "Print addresses in hexadecimal",
  91. "ignoreFailures": true
  92. },
  93. ]
  94. }
  95. ]
  96. }