When I run my C++ program it crashes with this error.
* glibc detected ./load: double free or corruption (!prev):
0x0000000000c6ed50 **
I'm trying to track it down using cout statement but am finding it difficult. Could gdb make this easier? How is it done?
...
I am debugging a crash using GDB and a core file. A large portion of the memory space is mmapped into the process. That portion of the memory is not saved into the core file. I have a file that contains all the data in that mmapped memory.
I would like to find a way to load the data from that file into GDB at a certain offset so th...
Hello all,
I am getting this strange error in gdb and i'm unable to trace the exact line of code to trace the bug. Does someone knows about this type of bug? Here is what i get in gdb
*** -[CALayer sublayers]: message sent to deallocated instance 0x911c2a0
(gdb) po 0x911c2a0
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0209...
Question has been asked before and I see bug report on ddd newsgroups but none of the suggested solutions work for me.
It comes up but when you try doing anything like opening a file it hangs with the message "waiting until GDB gets ready."
A crucial fact, reported by others too, is that it works fine for some users and not others. I'...
Hi all. I'm trying to analyze core dump, but i get following result.
If i make main.elf statically linked everything is OK and i can see bt of all threads.
Any ideas?
GNU gdb 6.6.0.20070423-cvs
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to chang...
I am using Eclipse 3.5.1 on Ubuntu 9.10, with CDT 1.0.0.200909110608
If I right-click the left margin for a context menu, 'Toggle Breakpoint', 'Enable Breakpoint' and 'Breakpoint Properties' are all greyed-out.
How can I enable these?
(Apart from breakpoints, the debugger and the rest of CDT are working fine.)
Thanks,
Chris.
...
As per subject.
I have some constants hash defined like so:
#define CONST 40
I've set a break point in my program. How do I print the value of that constant? (I know I can just look at the source code, but I want to be sure of it)
...
I am trying to debug a program using ddd. When I try to enter any function, or within main() itself, I get the following warning:
warning: (Internal error: pc 0x804a6b0 in read in psymtab, but not in symtab.)
This warning flashes whenever I try to move to another instruction using 'n' or enter or leave a function. I have tried to...
Hi, I'm writing a program to implement Dinic's max-flow algorithm over a network. The networks can be written either by hand or loaded from a file using stdin redirection.
I've been able to use gdb to debug the program with small files (around 30 lines), but I'm having trouble when I try to debug the program with bigger files (>1000 line...
I have subclassed QComboBox to customize it for special needs. The subclass is used to promote QComboBoxes in a ui file from QtDesigner. Everything works except that when I put a break point in a slot, the program does not stop at the breakpoint. I do however know that it is being called from the result it generates. I checked other slot...
I have a function that is called some large number of times, and eventually segfaults. However, I don't want to set a breakpoint at this function and stop after every time it's called, because I will be here for years. I've heard that I can set a counter in GDB for a breakpoint, and each time the breakpoint is hit, the counter is decreme...
I am attempting to use the gdb/mi debugger in the Eclipse CDT version 6.02. While I am debugging I can step through the program with ease up until I reach the following snippet of a block of code.
ENUM_START_TYPE My_Class::some_function( const char * c, const char * e)
{
ENUM_START_TYPE result = GENERIC_ENUM_VALUE;
if ( c[0] ...
I have a system that uses C methods as functions in a Postgres database. When I try to run gdb with my user account I get this:
ptrace: Operation not permitted
It looks like a permission thing. It seemed to work when I ran gdb as the "postgres" user. I would like to continue running postgres as the "postgres" user and not have to su ...
I am trying to use Eclipse CDT with Cygwin, but I have problems with the debugger. I have done the following:
- installed Eclipse CDT
- installed Cygwin with gcc, g++ make and gdb
- added c:\cygwin\bin to PATH
- created a new Hello World application in Eclipse
Compiling went well from Eclipse. The first problem was that I had to set the...
Whenever I try to print the return value of a method in my XCode gdb console (and in the value formatters), I keep getting (IMP) pointers instead of the return value. For example:
print [alternateDepartures count]
$9 = (IMP) 0x33725441 <-[NSCFArray count]+1>
here, alternateDepartures is an NSArray of ints, as evidenced by:
(gdb) po al...
I'd like to know if my program is accessing NULL pointers or stale memory.
The backtrace looks like this:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b0fa4c8 (LWP 1333)]
0x299a6ad4 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0 0x299a6ad4 in pthread_mutex_lock () from /lib/libpthread.s...
How can I set a conditional breakpoint to a function's 3rd line in GDB?
I know I could give the file name + line number but this is not working for me.
I have to store the gdb commands as a script to repeat it later and I don't want to change the script every time the source file is changing.
...
Hello,
I have c/gtk+ application and GList which filled three elements, when i try to run following code with gdb:
if (g_list_length(mw->img_list) > 0)
printf(">0");
else
printf("<0");
i see:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb73c4700 (LWP 7936)]
IA__g_list_length (list=0x6e6920) at g...
Can GDB be used to debug programs in languages other than C or C++, like Java?
...
HI,
I am normally a C programmer.
I do regularly debug C programs on unix environment using tools like gdb,dbx.
i have never done debugging of big applications of C++.
Is that much different from how we debug in C.
theoretically i am quite good in C++ but have never got a chance to debug C++ programs.
I am also not sure about what kind ...