Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init commit debug utils #30474

Merged
merged 25 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
coverage,
cws_instrumentation,
debug,
debugging,
devcontainer,
diff,
docker_tasks,
Expand Down Expand Up @@ -162,6 +163,7 @@
ns.add_collection(cluster_agent_cloudfoundry)
ns.add_collection(components)
ns.add_collection(coverage)
ns.add_collection(debugging)
ns.add_collection(docs)
ns.add_collection(bench)
ns.add_collection(trace_agent)
Expand Down
3 changes: 3 additions & 0 deletions tasks/debugging/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from tasks.debugging.dump import debug_job_dump # noqa
from tasks.debugging.dump import get_debug_symbols # noqa
from tasks.debugging.dump import get_job_dump # noqa
19 changes: 19 additions & 0 deletions tasks/debugging/delve.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
import sys
from pathlib import Path


class Delve:
dlv_cmd: Path | str

def __init__(self):
if sys.platform == 'win32':
self.dlv_cmd = 'dlv.exe'
else:
self.dlv_cmd = 'dlv'

def __interactive_cmd(self, cmd):
os.system(f'{self.dlv_cmd} {cmd}')

def core(self, binary: Path | str, core: Path | str):
return self.__interactive_cmd(f'core "{binary}" "{core}"')
Loading
Loading