Hi,
I'm trying to debug a C program using Eclipse CDT-s debugger and gdb on a Windows7 system, and everything seems fine, except for the console not showing up, which is bad, because my program needs input at some points from the keyboard.
So how should I make Eclipse's debugger work properly?
Thank you.
...
Hello all,
Last week I was a debugging a code and a weird situation came up: gdb passes through two different return clauses. I made a simple example that illustrates the situation:
#include <iostream>
using namespace std;
int test() {
string a = "asd";
string b = "asd";
while (true) {
if (a == b) {
...
Hi all,
recently I've started to use the excellent boost::unordered_map on my system, but got one drawback: I couldn't figure how to inspect its contents. Printing it on gdb gives me a table_ and a buckets_, but haven't found where are the items. Anyone has a clue about this?
...
I'm trying to debug a small program I've written in C. I open up the file in emacs, M-x gdb, give the program filename (a.out). When i switch to the source file in the emacs pane, and try to place a breakpoint in the main function, I get the message "No default breakpoint address now." and the breakpoint doesn't place, so I can't debug t...
I just finished a project for my cryptography class and it all seems to go well (mostly). Because the key is generated randomly, I wanted to ensure it would work for all keys. Anyway, I ran it a bunch of times and hit a segfault at around the 30th run. I haven't been able to reproduce this segfault in gdb. Does gdb have a command, or is ...
So in assembly I declare the following String:
Sample db "This is a sample string",0
In GDB I type "p Sample" (without quotes) and it spits out 0x73696854. I want the actual String to print out. So I tried "printf "%s", Sample" (again, without quotes) and it spits out "Cannot access memory at address 0x73696854."
Short version:
How d...
You can point a single symbol file to gdb with command symbol-file /usr/lib/debug/symbolfile.so
But how to tell gdb to load all symbol-files from given path including subdirectories?
...
I'm trying to debug Firefox trunk inside Eclipse CDT on Linux x86_64 (Ubuntu Karmic).
I have done the following:
I have made a path mapping from / to / per DevMo in the Source pane of the project-level Run/Debug config.
I have set /opt/Projects/obj-debug/dist/bin/firefox-bin as the C++ app in the Main pane. (My Firefox obj dir is /opt...
Hi,
Can any 1 please tell or show the difference in the behaviour of any program before and after I "set endian little" in gdb on solaris machine?
I want to know the effect of changing it.
Thanks!
...
I'm having some trouble stepping over in GDB. I've built an example program from the ffmpeg library with debug symbols on and stripping off. Although I configured the ffmpeg library to static and explicitly disabled shared, it looks like the program I'm debugging is linking dynamically, since its file size is only 99kB. I don't know t...
I have a qApp that generates a segmentation fault only when a breakpoint is inserted in the code (I can put it at different places) and only after 4-5 breakpoint stops. Do I have a problem with my code or is this a DBG bug. the method is part of a QThread Class.
Basically what I did is i took the mandlebrot example, and have 3 instan...
program runs fine. When I put a breakpoint a segmentation fault is generated. Is it me or GDB? At run time this never happens and if I instantiate only one object then no problems.
Im using QtCreator on ubuntu x86_64 karmic koala.
UPDATE1:
I have made a small program containing a simplified version of that class. You can download ...
Hi,
I'm using gdb to connect to a 2.6.31.13 linux kernel patched with KGDB over Ethernet, and when I try to detach the debugger I get this:
(gdb) quit
A debugging session is active.
Inferior 1 [Remote target] will be killed.
Quit anyway? (y or n) y
Bogus trace status reply from target: E22
after that the session is still open, I c...
I attached to a program with gdb in OSX and I want to use CFShow in the gdb console etc. However, nothing shows up. printf shows nothing as well:
(gdb) call (int) printf("Hello\n")
$10 = 6
(gdb) call (int) printf("Hello World!\n")
$11 = 13
Apple suggests the following tip for when attaching with gdb, to make the output appear in the g...
I have this gdb macro, which is used to print meaningful stacktraces when debugging the mono runtime. It iterates over all stackframes, figures out if that frame is native or managed. If it is managed, it uses info from mono_pmip() to print a decent description of that frame. If it is native, it calls gdb's "frame" to describe the frame...
Hi,
I'm getting this message in emacs when debugging:
error in process filter: gdb-stack-list-locals-handler: Stack overflow in regexp matcher
error in process filter: Stack overflow in regexp matcher
I then have to kill gdb and restart the debugging session.
Any ideas?
...
I am trying to debug an application using Eclipse CDT and cygwin gdb and I am facing a problem if my code calls Sleep(), it looks like whenever a sleep is encountered in the code the debugger seems to go in an infinite loop(I meant it never terminates or hit a breakpoint after sleep).
On pressing pause the code is stuck on one of the thr...
I am debugging some C code with gdb. My program has a variable of type mpz_t * retval. If I run the command
print *retval
I get the output
$23 = {{
_mp_alloc = 6,
_mp_size = 5,
_mp_d = 0x1001008d0
}}
Is there anything else I can do to get more information about the value stored in retval?
...
Hi,
I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this.
Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applicatio...
I am porting a project over to OS X. I am finding GDB debugging in the console to be woefully insufficient and really need a visual debugger. My project is built using Scons and as such, it sidesteps Xcode's IDE entirely. This is acceptable until I need to fire up a visual debugger and step through my code.
Aside from generating and ...