ddd-debugger

How to start GDB for C++ called from Python?

[亡魂溺海] 提交于 2020-06-29 04:00:14
问题 I need to debug a C++ function that is called from Python code. How to start GDB (or better DDD) in such a way that it debugs the C++ code called from a given Python command line? The given Python command line is: python3 -m e2e.Tests.Libs.HundredEightyOneTest It calls a C++ code that I need to debug. 回答1: My recommendation: recompile your python interpreter from its source code (so it gets compiled with DWARF debug information, practically speaking with GCC invoked as gcc -Wall -O -g ). Once

gdb/ddd Program received signal SIGILL

此生再无相见时 提交于 2020-01-12 17:28:09
问题 I wrote a very simple program in Linux using c++, which downloads images from some website over http (basically developed a http client request), using cURL libraries. http://curl.haxx.se/libcurl/c/allfuncs.html #define CURL_STATICLIB #include <stdio.h> #include <stdlib.h> #include </usr/include/curl/curl.h> #include </usr/include/curl/stdcheaders.h> #include </usr/include/curl/easy.h> size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written = fwrite(ptr, size,

GDB: How to list all source files used for compilation

你离开我真会死。 提交于 2019-12-18 12:05:25
问题 New to the project, have multiple source files used for compilation and some "could" be dynamic libraries, loaded at runtime. When debugging the executable using "GDB", is there a command to list all the source files (static) used to build the executable. Once I have all the source files, it's easy for me to set breakpoints, list functions etc. I couldn't find a command to do it in GDB (I'm sure there should be one). In DDD (gui based gdb), there is a Menu: File->List, which lists all the

windows version of the GDB frontend DDD

蓝咒 提交于 2019-12-17 18:34:58
问题 Is there a native (not cygwin) version of DDD available for download somewhere? 回答1: There is also a GDB front-end for MS Visual Studio, called WinGDB. It supports both Cygwin and MinGW. You use it just like built-in debugger in VS. It's also possible to debug remotely on Linux via SSH. 回答2: DDD has not been ported to Windows AFAIK. But there ARE native gdb, which can be perfectly built using MingW32. You can also build Insight natively using Mingw32. You can also give a try to BeaverDbg 回答3:

Starting ddd with remote gdbserver

帅比萌擦擦* 提交于 2019-12-09 05:51:13
问题 I'm debugging a program that runs on a remote target using ddd ( the remote gdbserver is running on localhost over port 1234 for example, but still acts as remote). I know you can connect to the gdbserver by opening ddd, then calling target remote localhost:1234 on the gdb command line of ddd, as described in: http://www.gnu.org/software/ddd/manual/html_mono/ddd.html#Remote%20Program However, I hate having to call the target remote localhost:1234 command every time I open ddd, and I'd like to

gdb/ddd Program received signal SIGILL

天大地大妈咪最大 提交于 2019-12-04 04:09:18
I wrote a very simple program in Linux using c++, which downloads images from some website over http (basically developed a http client request), using cURL libraries. http://curl.haxx.se/libcurl/c/allfuncs.html #define CURL_STATICLIB #include <stdio.h> #include <stdlib.h> #include </usr/include/curl/curl.h> #include </usr/include/curl/stdcheaders.h> #include </usr/include/curl/easy.h> size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written = fwrite(ptr, size, nmemb, stream); return written; } int main(void) { CURL *curl; FILE *fp; CURLcode res; char *url = "http

Starting ddd with remote gdbserver

允我心安 提交于 2019-12-03 08:15:01
I'm debugging a program that runs on a remote target using ddd ( the remote gdbserver is running on localhost over port 1234 for example, but still acts as remote). I know you can connect to the gdbserver by opening ddd, then calling target remote localhost:1234 on the gdb command line of ddd, as described in: http://www.gnu.org/software/ddd/manual/html_mono/ddd.html#Remote%20Program However, I hate having to call the target remote localhost:1234 command every time I open ddd, and I'd like to set it to connect to the gdbserver automatically with an alias. I tried running ddd --rhost localhost

What is a good unix alternative to DDD (Data Display Debugger)? [closed]

。_饼干妹妹 提交于 2019-11-30 10:45:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . I am developing c on linux using vim and debugging using ddd. However I find that ddd performs very poorly at scrolling on this machine so its sometimes very frustrating to use. I like the way that ddd maps fairly closely to the gdb command set as this means I am free to use gdb commands when I choose, but using

GDB: How to list all source files used for compilation

回眸只為那壹抹淺笑 提交于 2019-11-30 08:07:59
New to the project, have multiple source files used for compilation and some "could" be dynamic libraries, loaded at runtime. When debugging the executable using "GDB", is there a command to list all the source files (static) used to build the executable. Once I have all the source files, it's easy for me to set breakpoints, list functions etc. I couldn't find a command to do it in GDB (I'm sure there should be one). In DDD (gui based gdb), there is a Menu: File->List, which lists all the source files used and static libraries used for building the executable. Unfortunately, for command line

Debugging Python and C++ exposed by boost together

早过忘川 提交于 2019-11-28 21:21:47
I can debug Python code using ddd -pydb prog.py . All the python command line arguments can be passed too after prog.py . In my case, many classes have been implemented in C++ that are exposed to python using boost-python . I wish I could debug python code and C++ together. For example I want to set break points like this : break my_python.py:123 break my_cpp.cpp:456 cont Of course I am trying it after compiling c++ codes with debug option but the debugger does not cross boost boundary. Is there any way? EDIT : I saw http://www.boost.org/doc/libs/1_61_0/libs/python/doc/html/faq/how_do_i_debug