I am working on a large codebase and trying to debug the same using gdb(C/C++) extension on VSCode. On running a particular configuration, I get an error with exit code 139. I know this is a segmentation fault, but am unable to exactly pinpoint where the seg fault is occurring. Is there any way I ..
I have 3 machines: Local machine Linux build machine Linux test machine My process is to SSH into the build machine, do my development there, make the project which outputs binaries into a release/ directory. Then I rsync my release/ directory to the test machine, where I actually run the program. I have to develop ..
I’m using a python script which ultimately starts another C++ executable which in turn loads several other applications into memory for execution, along with other .so shared libraries using dlopen. What GDB command should I be using to debug(run backtrace etc.) these dynamically loaded executables and libraries ? I tried running it as gdb –args ..
Problem I am using Docker on Windows 10 to build my source code with GCC. The Source code is located under wsl$Ubuntuhome<user>workspace<project Since the output file (Debug) will not be able to map addresses to my Source-Code-Files in the IDE (Eclipse, VSCode,…) i need to substitute the path to windows/WSL. Solution When working with GDB, ..
I am debugging a c++ code in centos environment. I found the code crashed without core file Usually, every core dumped will have a core file, after i set: ulimit -c unlimited My Environment is: Centos 8.3 is there anything i need to set? I am sure the code is not too huge, the core ..
I have a text file (gdb batch) called magic: call (int) mlockall(1) print *((int*(*)())__errno_location)() detach And it all works as expected with a single thread code written in c++ like so # gdb –batch -x magic -p 28672 $1 = -1 $2 = 12 When I run it with a parent pid of multithread process ..
I want to pass some inputs to my gdb debugger to automate it. Something like this: Enter number of inputs: 5 Enter 5 inputs: 2 4 3 2 5 I have an expect script for that to automate my binary file. Can I combine my expect script and gdb script? Source: Windows Que..
So I’m trying to debug some simple C++ programs, namely small projects and competitive programming related things where I use a lot of containers. But every coding environment I’ve tried (gdb, vs code, clion) have a hard time displaying std containers and structs. But leetcode’s debugger works perfectly for displaying any data structure. Essentially, I’m ..
In visual studio you can see where the function is located, i.e. within which binary file. For example: Is there a command for GDB? Source: Windows Que..
In visual studio you can see where the function is located, i.e. within which compiled binary file. For example: Is there a command for GDB? Source: Windows Que..