forked from boostorg/interprocess
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create natvis definition for offset_ptr, and implement the Unordered …
…customization point intrinsic functions
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright 2024 Braden Ganetsky. | ||
Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
--> | ||
|
||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
|
||
<Type Name="boost::interprocess::offset_ptr<*>" Inheritable="false"> | ||
<!-- This is a simplified and inlined version of `offset_ptr::get()` --> | ||
<Intrinsic Name="get" Expression="(internal.m_offset == 1) ? (pointer)nullptr : (pointer)((unsigned char*)this + internal.m_offset)" /> | ||
<Intrinsic Name="boost_to_address" ReturnType="pointer" Expression="get()" /> | ||
|
||
<!-- This is a simplified and inlined version of `offset_ptr::operator+=()` --> | ||
<Intrinsic Name="boost_next" ReturnType="pointer" Expression="reinterpret_cast<pointer>( reinterpret_cast<unsigned char*>(ptr) + static_cast<offset_type>(offset * (difference_type)sizeof(element_type)) )"> | ||
<Parameter Name="ptr" Type="pointer" /> | ||
<Parameter Name="offset" Type="difference_type" /> | ||
</Intrinsic> | ||
|
||
<DisplayString>{get()}</DisplayString> | ||
<Expand> | ||
<ExpandedItem>get()</ExpandedItem> | ||
</Expand> | ||
</Type> | ||
|
||
</AutoVisualizer> |