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

Include PDBs for .sys #22

Merged
merged 1 commit into from
Jan 31, 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
11 changes: 11 additions & 0 deletions bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,19 @@ function(convert_to_native file_name out_name option)
COMMENT "Copying BPF object ${bpf_sys_file_path} to output directory"
POST_BUILD)

# Copy the .pdb file to the output directory as part of post build
add_custom_command(
OUTPUT ${bpf_pdb_file_output_path}
COMMAND ${CMAKE_COMMAND} -E copy ${bpf_pdb_file_path} ${bpf_pdb_file_output_path}
DEPENDS ${bpf_pdb_file_path}
COMMENT "Copying BPF object ${bpf_pdb_file_path} to output directory"
POST_BUILD)

# Add a custom target that depends on the .sys file
add_custom_target(${bpf_sys_file_name}_out ALL DEPENDS ${bpf_sys_file_output_path} SOURCES ${bpf_sys_file_path})

# Add a custom target that depends on the .pdb file
add_custom_target(${bpf_pdb_file_name}_out ALL DEPENDS ${bpf_pdb_file_output_path} SOURCES ${bpf_pdb_file_path})
endfunction()

configure_file(
Expand Down
4 changes: 0 additions & 4 deletions bpf/lpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ SEC("sockops/update") int update(void* ctx)
ipv4_route route_key = {32, 0};

if (!test_route) {

bpf_printk("Failed to lookup route %d\n", key);
return 1;
}
route_key = *test_route;
Expand All @@ -149,8 +147,6 @@ SEC("sockops/replace") int replace(void* ctx)
ipv4_route route_key = {32, 0};

if (!test_route) {

bpf_printk("Failed to lookup route %d\n", key);
return 1;
}
route_key = *test_route;
Expand Down
Loading