mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-11 17:48:34 +00:00
Adjust and fixx abseil-cpp debugging visualization (#12415)
Move abseil-cpp.natvis file, add it to PDB, adjust visualization
This commit is contained in:
parent
ca6b4221fe
commit
eebaf5f270
3 changed files with 17 additions and 6 deletions
4
cmake/external/abseil-cpp.cmake
vendored
4
cmake/external/abseil-cpp.cmake
vendored
|
|
@ -13,6 +13,10 @@ else()
|
|||
set(ABSL_PATCH_COMMAND git apply --ignore-space-change --ignore-whitespace ${PROJECT_SOURCE_DIR}/patches/abseil/Fix_Nvidia_Build_Break.patch)
|
||||
endif()
|
||||
|
||||
# NB! Advancing Abseil version changes its internal namespace,
|
||||
# currently absl::lts_20211102 which affects abseil-cpp.natvis debugger
|
||||
# visualization file, that must be adjusted accordingly, unless we eliminate
|
||||
# that namespace at build time.
|
||||
FetchContent_Declare(
|
||||
abseil_cpp
|
||||
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/abseil-cpp"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="absl::InlinedVector<*>">
|
||||
<DisplayString>{{ size={storage_.metadata_.value >> 1} }}</DisplayString>
|
||||
<Type Name="absl::lts_20211102::InlinedVector<*>">
|
||||
<DisplayString>{{ size={ storage_.metadata_.value >> 1 } }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[N]" ExcludeView="simple">$T2</Item>
|
||||
<Item Name="[capacity]" ExcludeView="simple" Condition="(storage_.metadata_.value & 1) == 0">$T2</Item>
|
||||
<Item Name="[capacity]" ExcludeView="simple" Condition="(storage_.metadata_.value & 1) == 1">storage_.data_.allocated.allocated_capacity</Item>
|
||||
<Item Name="[allocator]" ExcludeView="simple">storage_.metadata_</Item>
|
||||
<Item Name="[N]" ExcludeView="simple">$T2</Item>
|
||||
<Item Name="[allocator]" ExcludeView="simple" Condition="(storage_.metadata_.value & 1) == 1">storage_.metadata_</Item>
|
||||
<IndexListItems Condition="(storage_.metadata_.value & 1) == 0">
|
||||
<Size>storage_.metadata_.value >> 1</Size>
|
||||
<ValueNode>(($T1 &)(storage_.data_.inlined.inlined_data[$i]))</ValueNode>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
</Expand>
|
||||
</Type>
|
||||
<!-- Should handle both flat hash_set and hash_map -->
|
||||
<Type Name="absl::container_internal::raw_hash_set<*>">
|
||||
<Type Name="absl::lts_20211102::container_internal::raw_hash_set<*>">
|
||||
<DisplayString Condition="size_ == 0">empty</DisplayString>
|
||||
<DisplayString>{{ size={size_} }}</DisplayString>
|
||||
<Expand>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="absl::container_internal::map_slot_type<*>">
|
||||
<Type Name="absl::lts_20211102::container_internal::map_slot_type<*>">
|
||||
<DisplayString>{{ {value.first}:{value.second} }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[key]" ExcludeView="simple">value.first</Item>
|
||||
|
|
@ -110,6 +110,13 @@ endif()
|
|||
|
||||
if(NOT onnxruntime_DISABLE_ABSEIL)
|
||||
include(external/abseil-cpp.cmake)
|
||||
if (MSVC)
|
||||
set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis")
|
||||
target_sources(
|
||||
onnxruntime_common
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/${ABSEIL_NATVIS_FILE}>
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
onnxruntime_add_include_to_target(onnxruntime_common date_interface wil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue