I'm developing an iPhone application. I have an EXC_BAD_ACCESS that occurs only in the release target; when I build the debug target the exception does not occur. However, when I set the NSZombieEnabled environment variable to YES, I still get the EXC_BAD_ACCESS with no further information. Is it even possible for NSZombieEnabled to work...
I know about specifying source locations using gdb. But I am wondering if there's someplace in my Xcode project or other settings where I can specify source directories such that gdb would use whatever I specify to look for sources. If I could put them in Xcode settings I think it would help me save them in a central place.
...
Hey folks!
I'm new to gdb and I tried out the following: I set a breakpoint, which worked fine actually, but is there any possibility to jump immediately to that breakpoint without using "next" or "step". Using "next" or "step" takes really long to get to the final breakpoint. I wasn't able to find a faster way.
Any help is preciated!...
Hi,
i started to try reverse debugging with gdb 7, followin the tutorial:
http://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial
and I thought, great!
Then I started to debug a real program which gives an error at the end. So I run it with gdb, and I put a breakpoint just before the place I think the error appears. Then I type "r...
How to display vtable using a pointer to base class object having virtual functions?
...
I have Eclipse set up fairly nicely to run the G++ compiler through Cygwin. Even the character encoding is set up correctly!
There still seems to be something wrong with my configuration: I can't debug. The pause button in the debug view is simply disabled, and no threads appear in my application tree. It seems that gdb is simply not co...
0x80002bc <__execve>: pushl %ebp
0x80002bd <__execve+1>: movl %esp,%ebp
0x80002bf <__execve+3>: pushl %ebx
0x80002c0 <__execve+4>: movl $0xb,%eax
0x80002c5 <__execve+9>: movl 0x8(%ebp),%ebx
0x80002c8 <__execve+12>: movl 0xc(%ebp),%ecx
0x80002cb <__execve+15>: movl 0x10(%ebp),%edx
The last 2 lines are indente...
Hi,
I have a function m(int i, char c) which takes and returns a char between "-abc...xyz" and also takes an integer i.
Basically I have no way to see the source code of the function but can call it and get the return value. Using gdb/C, what's the best way to decipher what the function actually does? I've tried looking for patterns us...
I am examining a core dump, and noticed that in one frame the 'this' pointer is different than in the next frame (in the same thread). Not just a little different, it went from 0x8167428 to 0x200.
I am not that well-versed in using GDB, but this does not seem right to me. Is this problematic, and if so, what could be the cause?
...
I have a project in Qt Creator that builds fine, but when I try to debug it I get this message:
Adapter start failed
Unable to start gdb 'C:\Qt\2010.02.1\mingw\bin\gdb.exe':
Process failed to start: The directory name is invalid
If I navigate to the debug build folder and directly run my compiled application, it will run fine, but ob...
I'm working on a barebones drawing app. I'm attempting to implement undo/redo capability, so I tell the view's undoManager to save the current image before updating the display. This works perfectly (yes, I understand that redrawing/saving the entire view is not incredibly efficient, but to solve this problem before attempting to optimiz...
In gdb, is there a way to access the contents of info frame in a script?
I'm debugging a problem somewhere between Apache, PHP, APC and my own code, and I have about a hundred cores to choose from. Following the instructions here
http://bugs.php.net/bugs-generating-backtrace.php
I end up with a stacktrace like:
#0 0x0121a31a in do_b...
I'm trying to investigate the state of the C/C++ heap from within gdb on Linux amd64, is there a nice way to do this?
One approach I've tried is to "call mallinfo()" but unfortunately I can't then extract the values I want since gdb doesn't deal with the return value properly.
I'm not easily able to write a function to be compiled into...
I compiled GDB 7 on a Mac OS X Leopard system. When stepping through a C program, GDB fails to step through 'printf()' statements, which probably don't have associated debug information, and starts printing "Cannot find bounds of current function."
Here's some output:
$ /usr/local/bin/gdb try1
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free...
So, I've defined a class like
DataLoggingSystemStateReceiver
{
DataLoggingSystemStateReceiver()
: // initializer list
{
// stuff
}
// ... other functions here
};
In main, I instantiate DataLoggingSystemStateReceiver like so:
int main()
{
// ... run stuff
Sensor sensor(port, timer);
DataLoggingSystemStateReceiver...
Hi all,
I've got a c++ app, with the following main.cpp:
1: #include <stdio.h>
2: #include "HeatMap.h"
3: #include <iostream>
4:
5: int main (int argc, char * const argv[])
6: {
7: HeatMap heatMap();
8: printf("message");
9: return 0;
10: }
Everything compiles without errors, I'm using gdb (GNU gdb 6.3.50-20050815 (Appl...
I was reading this question and realized it might be helpful for entry- and pro-level developers alike (including myself) to have a common reference for best practices in using gdb.
Many questions asked on Stack Overflow could easily be solved by taking some time to step some code in a debugger, and it would be good to have a community-...
Let's say i have 15 processes/daemons running in the background.
let's say one of the process has dumped the core.
how could i identify which process has dumped the core.
i am using hpux!
...
Hello all,
I am using standard template libraries along with boost. I want to debug code using cgdb. But I just want to debug my code while doing next and step in cgdb, like right now it enters the code in other libraries whereas I want it should just return or step into the code which I have coded and wrote down.
Is there any way to m...
Hello all,
I am using emacs and autotools, to write and compile c/c++ sources on linux.
I am using gdb via GUD in emacs.
I have defined for convenience: F7:compile, F10:gud-next, F11:gud-step, F5:gud-cont, F9:gud-tbreak, F8:gud-until, F4:gud-print.
I am mainly interested in debugging c/c++ source code on linux from emacs and I would lik...