I have a module in Quantlib that does not work right when I invoke it from C# via SWIG. Is there a way I could debug into Quantlib from my C# unit test?
How to debug into Quantlib via SWIG from my C# unit test
1k views Asked by A-K At
1
There are 1 answers
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in SWIG
- Issue With Generating C++ Wrapper File For Python Code Using SWIG
- MinGW ld linking error - undefined reference
- AndroidBitmap_lockPixels() and SWIG
- Undefined symbol for boost serialization extended type info when using swig to convert from C++ to tcl
- How do I add dependencies that can't be installed with pip to my (django) project on Heroku?
- segfault at 10 when use python-ESL module to develop freeswitch application
- What is causing SWIG to generate invalid code?
- Bazel. Generating files which aren't available prior to bazel build during the build itself
- Swig is not detecting correctly the struct to call C++
- ImportError: DLL load failed: The specified module could not be found for custom built pkg using Swig & CMake
- Generate SWIG JNI for reference pointer
- SWIG issue using cmake on Mac - can't import .dylib file
- SWIG raise Syntax error - possibly a missing semicolon
- Using swig to access pointers to pointers from C in python
- Error installing faiss-cpu with pip: swig.exe command failed during wheel build for Python 3.12.0
Related Questions in QUANTLIB
- Quantlib Scehdule Error "Wrong number or type of arguments for overloaded function 'new_Schedule'."
- Using Quantlib to calculate the Zspread of a treasury bond is returning a type mismatch or number of arguments issue, not sure why?
- QuantLib Call Options Pricing over rows in a data frame
- Error message in RQuantLib FixedRateBond function
- Quantlib, difficulties reconciling yield to maturity of bond cashflows
- how to calculate iv and greeks from quantlib
- Rquantlib DiscountCurve Function - tsQuotes input parameters for Overnight Indexed Swap curves (OIS curves)
- Python Quantlib Incorrectly Bond Pricing Issue
- Extracting Discount Factors with reference from Bond Settlement Date instead of Evaluation Date in QuantLib
- YTM different to zero rates on zero-coupon bonds and issues with settlement days on discounting in QuantLib Python
- Repricing Bonds used for Bootstrapping in QuantLib-Python
- QuantLib's SwaptionVolCube1x<Model>::marketVolCube() is very slow
- Volume profile for higher timeframes
- Why the biz day convention of OIS Rate helper is hard coded as Modified Following in QL?
- QuantLib OvernighIborBasisSwapRateHelper
Related Questions in QUANTLIB-SWIG
- Quantlib Scehdule Error "Wrong number or type of arguments for overloaded function 'new_Schedule'."
- Extracting Discount Factors with reference from Bond Settlement Date instead of Evaluation Date in QuantLib
- Why the biz day convention of OIS Rate helper is hard coded as Modified Following in QL?
- QuantLib: null term structure set to this instance of index
- QuantLib swap pricing, index fixing leg missing
- Actual365Fixed.NoLeap no ois fixing on 28 Feb - Quantlib
- Quantlib Mac OSX - ld: symbol(s) not found for architecture arm64
- QuantLib how to use in goland?
- QuantLib error while Plotting Volatility Surface
- Quantlib Black Karasinski calibration with negative rates
- How to structure Fixed Rate cashflows with monthly interest rate compounded and paid Quarterly
- QuantLib in Python - cannot pickle 'SwigPyObject' object
- QuantLib-SWIG-1.19 python 'from . import _QuantLib' fails
- QuantLib Python Hull White Model - RuntimeError: time (20) is past max curve time (19)
- AttributeError: module 'QuantLib._QuantLib' has no attribute 'delete_SwigPyIterator' in python
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
No one else has answered yet, so I'll provide what we do in similar situations when debugging Ruby + SWIG.
Create a Visual Studio project that contains the C# Source Generated by SWIG, the C++ generated by SWIG, your C# unit test and the rest of the Quantlib source.
I just looked through the Quantlib provided Visual Studio solution files and don't see the SWIG targets, which is unfortunate, but if you have the C++ source at least, and can build it in debug mode, you might get there. The hard part is that the C# Dll you are calling is going to be expecting to references a certain C++ DLL in its calls. You may have to move your C++ Quantlib debug library into the Debug folder of the C# project, so it finds the specific version you want.
Once you have your solution configured, build everything as debug or rel with debug symbols.
If you at this point have the C# bindings source and the Quantlib C++ source in the same solution, you should be able to set a break point anywhere in the C# or C++ and be able to step through the calls from one to the other.
With our SWIG Ruby situation we are able to set breakpoints in the SWIG generated CXX file or in the C++ library source which is wrapped by swig and step through the calls made by the Ruby interpreter. We are able to do this by launching ruby from within Visual Studio as the start up project.
I hope this information provides some help.