Добавил информацию о работе в отладчиках.

This commit is contained in:
Aleksandr Orefkov 2025-11-17 17:06:26 +03:00
parent 1f0e64432e
commit 17782d6e6a
6 changed files with 24 additions and 3 deletions

BIN
for_debug/msvc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -2,12 +2,15 @@
[On Russian | По-русски](readme_ru.md) [On Russian | По-русски](readme_ru.md)
Two files have been prepared for more convenient display of simstr objects in msvc and gdb debuggers: Two files have been prepared for more convenient display of simstr objects in msvc and gdb debuggers:
simstr.natvis - for use in the MSVC debugger, and simstr_pretty_print.py for working with gdb. `simstr.natvis` - for use in the MSVC debugger, and `simstr_pretty_print.py` for working with gdb.
# simstr Objects in Debuggers # simstr Objects in Debuggers
### Visual Studio
If you are working in MS Visual Studio, simstr.natvis is automatically added to the pdb file, If you are working in MS Visual Studio, simstr.natvis is automatically added to the pdb file,
and provides convenient viewing of simstr string objects wherever this library is used. and provides convenient viewing of simstr string objects wherever this library is used.
![MSVC](msvc.png)
# simstr Objects in Visual Studio Code # simstr Objects in Visual Studio Code
## When working in gdb ## When working in gdb
In the debugger configuration, you need to add the following lines: In the debugger configuration, you need to add the following lines:
@ -56,6 +59,9 @@ In this case, the settings for connecting the script are written in `.vscode/set
} }
``` ```
### Result
![VSC+gdb](vsc_gdb.png)
If you are working with the MSVC debugger in Visual Studio Code, that is, in launch.json `"type": "cppvsdbg"`, then the setting is different: If you are working with the MSVC debugger in Visual Studio Code, that is, in launch.json `"type": "cppvsdbg"`, then the setting is different:
``` ```
"configurations": [ "configurations": [

View File

@ -5,9 +5,13 @@
simstr.natvis - для использования в отладчике MSVC, и simstr_pretty_print.py для работы с gdb. simstr.natvis - для использования в отладчике MSVC, и simstr_pretty_print.py для работы с gdb.
# Объекты simstr в отладчиках # Объекты simstr в отладчиках
### Visual Studio
Если вы работаете в MS Visual Studio simstr.natvis автоматически добавляется в pdb файл, Если вы работаете в MS Visual Studio simstr.natvis автоматически добавляется в pdb файл,
и обеспечивает удобный просмотр строковых объектов simstr везде, где используется эта библиотека. и обеспечивает удобный просмотр строковых объектов simstr везде, где используется эта библиотека.
![MSVC](msvc.png)
# Объекты simstr в Visual Studio Code # Объекты simstr в Visual Studio Code
## При работе в gdb ## При работе в gdb
В конфигурации отладчика необходимо добавить следующие строки: В конфигурации отладчика необходимо добавить следующие строки:
@ -56,6 +60,8 @@ simstr.natvis - для использования в отладчике MSVC, и
] ]
} }
``` ```
### Результат
![VSC+gdb](vsc_gdb.png)
Если же в Visual Studio Code вы работаете с отладчиком MSVC, то есть в launch.json `"type": "cppvsdbg"` то настройка другая: Если же в Visual Studio Code вы работаете с отладчиком MSVC, то есть в launch.json `"type": "cppvsdbg"` то настройка другая:
``` ```

BIN
for_debug/vsc_gdb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -76,6 +76,10 @@ it is downloaded automatically).
The work was tested under Windows on MSVC-19 and Clang-19, under Linux - on GCC-13 and Clang-21. The work was tested under Windows on MSVC-19 and Clang-19, under Linux - on GCC-13 and Clang-21.
The work in WASM was also tested, built in Emscripten 4.0.6, Clang-21. The work in WASM was also tested, built in Emscripten 4.0.6, Clang-21.
## Convenient debugging
Along with the library, two files are supplied that allow viewing simstr string objects in debuggers
more convenient.\
It is described in more detail in [here](for_debug/readme.md).
## Benchmarks ## Benchmarks
Benchmarks are performed using the [Google benchmark](https://github.com/google/benchmark) framework. Benchmarks are performed using the [Google benchmark](https://github.com/google/benchmark) framework.

View File

@ -76,6 +76,11 @@
Работа проверялась под Windows на MSVC-19 и Clang-19, под Linux - на GCC-13 и Clang-21. Работа проверялась под Windows на MSVC-19 и Clang-19, под Linux - на GCC-13 и Clang-21.
Также проверялась работа в WASM, сборка в Emscripten 4.0.6, Clang-21. Также проверялась работа в WASM, сборка в Emscripten 4.0.6, Clang-21.
## Удобная отладка
Вместе с библиотекой поставляются два файла, делающие просмотр simstr строковых объектов в отладчиках
более удобным.\
Более подробно описано [здесь](for_debug/readme_ru.md).
## Бенчмарки ## Бенчмарки
Бенчмарки производятся с использованием фреймворка [Google benchmark](https://github.com/google/benchmark). Бенчмарки производятся с использованием фреймворка [Google benchmark](https://github.com/google/benchmark).