lonewanderer-gh / nlohmann-json-gdb Goto Github PK
View Code? Open in Web Editor NEWProvides gdb script and python gdb script to pretty print a nlohmann / json (https://github.com/nlohmann/json)
License: MIT License
Provides gdb script and python gdb script to pretty print a nlohmann / json (https://github.com/nlohmann/json)
License: MIT License
I have downloaded nlohmann_json.py
file, and in gdb, I have errors:
(gdb) source nlohmann_json.py
PLATFORM_BITS 64
### Log info types output : All types matching regular expression "^nlohmann::basic_json<.*>$":
### Log info types output :
### Log info types output : File ./headers/json.h:
### Log info types output : nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >;
--------The researched nlohmann::basic_json type for this executable is---------
nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >
(Using regex: ^nlohmann::basic_json<.*>$)
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "nlohmann_json.py", line 375, in <module>
gdb.printing.register_pretty_printer(
AttributeError: 'module' object has no attribute 'printing'
And then, I add this line in it
import gdb.printing
It is OK
(gdb) source nlohmann_json.py
PLATFORM_BITS 64
### Log info types output : All types matching regular expression "^nlohmann::basic_json<.*>$":
### Log info types output :
### Log info types output : File ./headers/json.h:
### Log info types output : nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >;
--------The researched nlohmann::basic_json type for this executable is---------
nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >
(Using regex: ^nlohmann::basic_json<.*>$)
--------------------------------------------------
can you add the lines needed to automatically load this from .gdbinit? please assume zero python knowledge.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.