I have a C++ function which has many return statements at various places. How to set a breakpoint at the return statement where the function actually returns ?
And what does "break" command without argument means?
...
Hi,
I am trying to debug an application using gdb on Linux. However, when loading symbols from the shared library I want to debug, gdb always fails with the error:
gdb/utils.c:904: internal error: virtual memory exhausted: can't allocate 5592 bytes.
uname shows unlimited for all parameters including vmemory. Any ideas on how to resol...
I have a program which crashes due to a segmentation fault. The core file is produced.
running the core in gdb gives me the following:
HP gdb 6.1 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Core was generated by `gcpf1fwcApp'.
Program terminated with signal 6, Aborted.
I used the command
thread app...
How to disassemble file after use strip command in gdb?
...
I'm having trouble with gdb and loading debugging information from shared libraries.
The error I get when running from within gdb is:
>>run
Error while mapping shared library sections: libhmmm.so: Success.
....
....
>>break container_main
Error cannot access memory at 0x9f18
The shared library in question exists and is located in the...
GDB normally stops all threads if a breakpoint is reached (or Ctrl+C is pressed in the GDB shell). I'm aware that commands like scheduler-locking and schedule-multiple exists, but I see no possibility to let a defined thread run in the background while another is debugged.
...
I have a program written in assembly that crashes with a segmentation fault. (The code is irrelevant, but is here.)
My question is how to debug an assembly language program with GDB?
When I try running it in GDB and perform a backtrace, I get no meaningful information. (Just hex offsets.)
How can I debug the program?
(I'm using NASM ...
Hi everyone.
I learned about the debug tool of "ndk-gdb" from Android NDK r4. Now I can start debugging the hello-jni sample(although some issue exists).
But, for my own Android applications, I have several so libs to use, build from a large number of c/c++ files. I used to build these so files with ndk-build, and then copy these so fi...
Hi All,
I am getting this error on running gdb on a freebsd box.
"suspend_thread_callback generic error"
and
"suspend error: debugger service failed"
Everything looks fine till I break into the breakpoint. when I do "n" or "c" or anything after I break, I get this error.
Any help would be appreciated.
...
I would like to record the value of a local variable, t, each time that the program reaches a certain line. Accordingly, I tried:
(gdb) trace stoer_wagner_min_cut.hpp :197
Tracepoint 1 at 0x4123a0: file ./boost/graph/stoer_wagner_min_cut.hpp, line 197.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying j...
About once every three times I run my program, malloc reports a double free error; e.g.
myprogram(703,0xb06d9000) malloc: *** error for object 0x17dd0240: double free
*** set a breakpoint in malloc_error_break to debug
I've run the same code through valgrind more than a dozen times but it never reports a double free.
I ran the code t...
Since I upgraded my OS to Ubuntu 10.04, I'm experiencing serious problems with GDB. Basically, every time I try to auto-complete using TAB, the process becomes unresponsive for several seconds, or forever. I have to kill gdb and lose my session.
The same happens if I accidentally try to print a variable that isn't in scope or doesn't ex...
Hello,
I am developing a MPI program on a Linux machine where I do not have sudo/su access. As my program currently segfaults, I would like to examine the core dumps via gdb. Unfortunately, as the program is multi-threaded, all the threads write to one core dump. So I would like to be able to append the PID to each separate core dump fo...
Hey,
I have major issue with GNU gdb (GDB) SUSE (6.8.50.20090302-1.5.18).
It takes ages to print the value of a nested symbol and hitting Ctrl-C has no effect.
Do you know the reason? Is there any workaround?
Thanks
...
Anybody knows the error message?
gdbserver[949] segfault at 81c ip 0000081c sp bfeef918 error 4 in gdbserver [8048000+1c0000]
segmentation fault
Thanks,
...
That's a mouthful of a question but basically I want to know if I can use GDB on an application compiled to i686-pc-mingw on a linux cross-compiler. I want to debug the resulting program on the target windows box with source code references etc.
Is it possible and if so what to I need to take into account (ie, same version of mingw file...
I'm debugging somebody else's Qt program and ran into the following error message which I don't understand:
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in
conjuction with DW_OP_piece or DW_OP_bit_piece.
I'm not sure what that means and Google isn't of much help.
Here's the context - sLocation is a QStr...
Hi everyone,
I have recently switched to gdb-emacs integration, and its cool as you no longer need to a list of source code everytime, Although i miss a few features or may be i dont know how to do them?
I Use emacs in commandline mode emacs -nw as i dont like being away from console.
Now when i execute some command say c1 under gdb ...
Hi, I would like to debug a c++ source in Eclipse CDT but I still get this error message: Error while launching command: gdb --version
I have gdb 7.2. installed
Thank you for your advise.
...
I'm trying to debug a program I wrote in C++. Here is the code:
void a() { }
void b() { a(); }
int main() { b(); return 0; }
I compiled it using: g++ -g3 -O0 -o cards.exe cards.cpp.
Here is the output of my gdb session:
(gdb) b main
Breakpoint 1 at 0x401421: file cards.cpp, line 10.
(gdb) r
Starting program: C:\workspace\Cards\src...