gdb (6.3.50-20050815, shipping with XCode 3.2.3) seems confused about the location of source code for one of my files. This is the partial backtrace:
#0 0x00029c4f in -[STGameController endGame] () at iostream:76
#1 0x000266fd in -[STGameController exitButtonTapped:] () at iostream:76
#2 0x00482e14 in -[UIApplication sendAction:to:f...
I've run into some problems debugging a multi-threaded process using GDB. I have a multi-threaded process that splinters off into several (8 or 9) different threads, and I am trying to determine what the contents of variables are when the constructor for a class called XML_File_Data is called. However, I've run into a problem where, afte...
I'm making the transition from Eclipse CDT (with Qt integration plugin) to QtCreator 2.0 but there is still one thing that bother me with QtCreator :
When I debug in QtCreator, I don't see my qDebug messages inside the Application output tab until I stop the application I'm debugging... Then they are all displayed at once which is not v...
Hello all,
I'm debugging PHP 5.2.9 and everything works fine, but today during debugging I see that gdb don't stop when I set:
(gdb) break lstat
the breakpoint is in the list
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00002aaaaf810ea0
but, as written before, ...
I know that we can use several commands to access and read memory: for example, print, p, x...
But how can I change the contents of memory at any specific location (while debugging in GDB)?
Thanks for any info.
...
I am having a slight problem with some structs in a kernel module I'm building, so I thought it would be nice if there was an easy way to print out structs and their values - and below is a small userland example of what I mean.
Say we have the simple C example as below (given in form of a bash commands):
FN=mtest
cat > $FN.c <<EOF
#i...
Some things in GDB (actually using DDD gui) confuse me, when debugging my own C++ codes:
1) Why is there no backtrace available after a HEAP ERROR crash?
2) Why does gdb sometimes stop AFTER the breakpoint rather than AT the breakpoint?
3) Sometimes stepping through commented lines causes execution of some instructions (gdb busy)??
Any...
Deal,
I followed "http://pdk.android.com/online-pdk/guide/debugging_gdb.html" to debug android PDK for deep understanding of Surfaceflinger.
When I type gdbclient system_server in the last step,
I got
This GDB was configured as
"--host=i686-pc-linux-gnu
--target=arm-elf-linux"...
_dl_start () at bionic/linker/arch/arm/begin...
I am looking for a clever way to track function calls and returns.
I know I can use the debugger, but I would like a way to just have it print something out to the terminal when calling a function vs having to step through code.
I am thinking that I might be able to use the preprocessor, but I am not sure what would be the best way to go...
I am building previously working code, but I am getting a seg fault and I can't figure out what went wrong. gdb catches the error, but it doesn't point to an obvious cause. The source line it shows is a function name, so it doesn't even get into the function. If I look at the dissasembly of the instruction it is still setting up the stac...
Hi all,
I was trying to use CDT with MinGW under Windows 7. It could run the program without any mistakes; however, when I started debugging, it prompted the following messages. I've no idea where the problem was. Any comments are welcome. Thanks in advance.
Failed to execute MI command:-gdb-set auto-solib-add on
Error message from...
OK, so imagine that my breakpoint in objc_exception_throw has just triggered. I'm sitting at the debugger prompt, and I want to get some more information about the exception object. Where do I find it?
...
I'm currently using GDB to debug a C Extension for Rails 3. Everything works perfectly except for RDebug contexts, where both GDB and RDebug echo my key input.
How can I turn off the key echo for RDebug? I don't believe I can solve this through GDB, as that would require constantly switching the echo on and off.
...
I have a pointer in GDB, how can I find out where it was first allocated on the heap?
In WinDBG, this can be done by !heap -p -a <0x12345678> after turning on gflags /i <*exe> +ust
Since Valgrind can tell me where the memory is allocated (when it detects some leaks), I guess this is also possible?
(This is NOT about watchpoint. This i...
I have a simple c++ program I am trying to debug, but gdb cannot find the object file for the libraries (or no debug info is available), and it does not seem able to find the debug symbols for my executable either.
I am on OSX 10.5.8, with macports, and I compile my code with
g++-mp-4.5 -Wall -pedantic -std=c++0x -g -ggdb -I/opt/loc...
Hi,
I'm trying to debug into a third-party library (GTS).
I installed the shared library and its debugging symbols from the Synaptic Package Manager in Ubuntu. I also downloaded the source files for the library from Sourceforge.
I'm using Eclipse CDT to debug one the provided examples, and I would like to go into
the library's code. Th...
GDB does not see any threads besides the one in which crash occurred; or SIGTRAP kills my program when I set a breakpoint.
...
Is there a way how I can access gdb's console in eclipse? I would like to just be able to set breakpoints with the mouse and then use the console for debugging.
...
Hello,
Is it possible to see strings that use 16 bits chars in Xcode debugger? I use a custom string class, not NSString. The strings are NULL terminated. The only way I can see the strings is if I see them as memory, but they are hard to read.
Thank you!
...
I managed to get my C++ project running in Xcode using cmake -G Xcode. Now I would like to debug it, because of the nice gdb fronted it provides.
However I need to change the working directory where gdb is executed otherwise it wont work. (It needs to read some data from files relative to the path of the working directory) What I can do...