Skip to content

Commit 2722ee5

Browse files
committed
Debug file contents
1 parent 3d4f194 commit 2722ee5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ports/zephyr-cp/cptools/cpbuild.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ async def run_command(command, working_directory, description=None, check_hash=[
187187

188188
cancellation = None
189189
async with shared_semaphore:
190+
for i, part in enumerate(command):
191+
if isinstance(part, str) and part.startswith("@"):
192+
with open(part[1:], "r") as f:
193+
print("Contents of file:", part[1:])
194+
content = f.read()
195+
print(content)
190196
global max_track
191197
if not tracks:
192198
max_track += 1
@@ -332,7 +338,7 @@ def __init__(self, srcdir: pathlib.Path, builddir: pathlib.Path, cmake_args):
332338
escaped_cflags = self.cflags.replace("/", "\\\\")
333339
else:
334340
escaped_cflags = self.cflags
335-
print("writing:")
341+
print("writing to:", self._cflags_tempfile.name)
336342
print(escaped_cflags)
337343
self._cflags_tempfile.write(escaped_cflags.encode())
338344
self._cflags_tempfile.flush()
@@ -348,7 +354,6 @@ async def preprocess(
348354
depfile = output_file.parent / (output_file.name + ".d")
349355
if depfile.exists():
350356
pass
351-
print("Preprocessing:", source_file.relative_to(self.srcdir))
352357
await run_command(
353358
[
354359
self.c_compiler,

0 commit comments

Comments
 (0)