So I am trying to debug a code. But for some reason it doesn't pass through the section I need it to. The governing variable which calls the piece of code is a pointer "*sret". I tried a lot but with no luck. Its a C program. Is there a way I can attach a watch point on a variable? as it wouldn't recognize the variable...It recognizes the file though.
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 DEBUGGING
- How to pass the value of a function of one class to a function of another with the @property decorator
- Visual Studio C++, breakpoints not stopping debugging DLL (GODOT GDExtention)
- Playwright JS: Getting an error when debugging using line numbers
- C++ skips line when promting for user to enter name of person being added to a string array
- Xcode: Can't Attach to process
- unity navmeshsurface prefab not found or whatever
- It seems to be a bug about "base::trace()" or "methods:::.TraceWithMethods()"?
- How to check reference counting issues when doing direct manipulations of CPython objects?
- How to scroll to the bottom of console window in PyCharm2019 automatically?
- need help debugging prolog
- Is there a way to deactivate (but not delete) conditional breakpoints when debugging?
- How can i debug a python exe which is created by using pyinstaller?
- Increment or Decrement volume programmatically on Xiaomi device adjusts it by 10 steps instead of one step
- Checking request JSON with image data
- Why cannot I set font of `xlabel` in `plotmf` in MATLAB?
Related Questions in TOTALVIEW
- How to resolve error in debugging a program in totalview?
- Debug complex return statement
- How to disallow my debugger (totalview) to step into the standard library implementation?
- How can I send complex data to my visualizer in TotalView?
- totalview only recognizes some variables, executable lines
- Intel Fortran character pointer corruption when enabling OpenMP
- Get QStringList content in Totalview debugger
- mpif90 compiled Fortran program calls h5fc compiled subroutine, some passed parameters get bad addresses
- Finding memory consumed using core file
- Attach totalview debugger to a variable
- Totalview get the value of QString
- Check the lmgrd log file, or try lmreread - An error when loading an Open MPI program in Totalview
- Error while trying to debug CUDA code using TOTALVIEW
- Querying Datasource via ODBC using PHP
- Problems with Totalview debugging software on OSX
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)
@Ban,
If you are using the TotalView debugger then this is a great question. Yes, we do provide watchpoints. However, they are set on memory locations, as opposed to variables. This distinction is important because if you imagine a function that calls itself recursively and a local variable X in that function. You can run the program to that function, dive on X and set a watchpoint on it. The watchpoint will trigger if that specific instance of X (which points to that memory location in the stack) is written to. We won't stop if, for example, the function calls itself again (which effectively creates a new, distinct, X at a different location in the stack) and that second X is written to.
Some other capabilities you might find useful:
You can set the value of your variable directly in the debugger. You can use this to verify that if the variable has the "right" value the program will behave as you expect it.
You can step instruction by instruction over the part of the program where you expect that it should make the decision to go down the code path you are looking for it to get into. Displaying both the source and assembly code is useful for this kind of debugging.
If you are on the linux-x86-64 platform you may find the ReplayEngine capability helpful. This lets you run forwards and backwards through your program -- which might help you really narrow in on exactly what is happening to keep your program from doing what you want.
Let me know how you get on with debugging this problem. If you found your solution some other way I'd be curious about that as well.
Good luck!
Chris Gottbrath
Principal Product Manager for TotalView at Rogue Wave Software
email: first dot last at roguewave dot com