Skip to content

Commit

Permalink
add cgo jattach code
Browse files Browse the repository at this point in the history
  • Loading branch information
chaolihf committed Feb 13, 2024
1 parent e02e74f commit 9cd38d6
Show file tree
Hide file tree
Showing 7 changed files with 465 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,30 @@
],
"preLaunchTask": "buildNamespace"
},
{
"name": "测试Jattach(clang)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/jattach.out",
"args": ["18826" ,"threaddump"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "buildJattach"
}
]
}
16 changes: 14 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"Codegeex.SidebarUI.LanguagePreference": "中文",
"files.associations": {
"cstdlib": "c"
}
"cstdlib": "c",
"stdio.h": "c",
"sched.h": "c",
"cpu-set.h": "c",
"types.h": "c",
"unistd.h": "c",
"stdlib.h": "c",
"fcntl.h": "c",
"psutil.h": "c",
"syscall.h": "c",
"un.h": "c",
"sockaddr.h": "c"
},
"cmake.configureOnOpen": false
}
24 changes: 23 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-DJATTACH_VERSION=\"2.2.0\"",
"-g",
"${workspaceFolder}/pkg/cgo/setNamespace_test.c",
"-o",
Expand All @@ -23,6 +22,29 @@
"isDefault": false
},
"detail": "Task generated by Debugger."
},
{
"type": "cppbuild",
"label": "buildJattach",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"${workspaceFolder}/pkg/cgo/jattach_test.c",
"-o",
"jattach.out"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": false
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
Expand Down
Loading

0 comments on commit 9cd38d6

Please sign in to comment.