gdb

How extract text from gdb?

Sometimes,I would need to get the gdb output.In the shell,I could use script command to extract text.Whats the equivalent in gdb? ps: I tried shell script,but after hitted return, I was in the shell and lost the shell prompt and could not run command any more,moreover I could not use ctrl+c or ctrl+\ to exit.I'll need to force kill the ...

How to use GDB to debug a big project?

Now I have a c language project which include three directories /bin, /inc and /src. All of header files (.h) are included in /inc and all of source(.c) files are stored in /src, i.e. a.c, b.c, c.c..., the final generated executable file will locate in /bin. after compling with makefile, all of obj files will be generated in /src/obj li...

Still the problem of debug project with GDB tool

Here is more specific explanation of what I want to make clear: I have some source c files locate under JM/lencod/src ; and some header h files locate under JM/lencod/inc ; and a Makefile locates at JM/lencod ; After I compile these source files using Makefile, some of obj files will be generated under JM/lencod/obj , meanwhile a len...

Continue to debug after failed assertion on Linux? [C/C++]

When an assertion fails with Visual C++ on Windows, the debugger stops, displays the message, and then lets you continue (or, if no debugging session is running, offers to launch visual studio for you). On Linux, it seems that the default behavior of assert() is to display the error and quit the program. Since all my asserts go through ...

How can I display Unicode strings while debugging on linux?

I have been working for some years now as C++ Developer using MS Visual Studio as working platform. Since I privately prefer to use linux, I recently took the chance to move my working environment to linux as well. Since I have been optimizing my windows environment for several years now, of course it turns out several things are missin...

Xcode "warning: Could not find object file ... no debug information available for ..."

Messing about with various settings for unit-testing plug-ins left me with a discombobulated project file. I seem to have fixed it, but there is one side effect: everytime I run the plug-in, the console fills with warnings for each and every class file, like so: warning: Could not find object file "/Users/elisevanlooij/Documents/Proj...

Debugging with Code Blocks and a custom make (Boost.Build)

I've been using Code::Blocks with MinGW on a WinXP box for a while now. But since I started using Boost.Build as "custom build tool" I'm having trouble setting break points from Code::Blocks. When I start a debugging session Code::Blocks tries to send all break points to GDB but GDB doesn't seem to recognise the sources' filenames: Debu...

How to debug programms written in fasm under linux using gdb?

I wrote simple "hello, world" in fasm, and its works, but how i can generate debug info for gdb and edb (Evan's Debugger)? Fasm compiler could only produce debugging symbols in its specific format - "fas", which of course gbd couldn't understood. ...

vertical split for cgdb ?

Hi, I'd like to know if it is possible to vertically split screens in cgdb ? Regards, ...

Is there a gdb (or similar) frontend that will show the program stack visually?

Basically, I'm looking for something where I can break execution and then see a visual representation of the stack in memory. DDD doesn't have this as far as I can tell. ...

Load a new exe with gdb

I am currently trying to make use of gdb to disassemble an exe, and from my home, I start the application like such: gdb "c:\file.exe" And gdb starts and loads that file automatically. Now the problem is that from where I am atm, the command prompt is disabled and thus I cannot run the terminal window with the filename as the argumen...

How do I show what fields a struct has in gdb?

I came upon a struct called ngx_http_variable_value_t in my gdb session and I would like to print what fields it has in the console. Is that possible? ...

how to add gdb to cygwin

hi friends,how to add gdb to cygwin.I havw downloaded gdb tar package for cygwin from sourceforge.On extracting iot there are many files ,I pasted the gdb.exe file from the package in the bin folder of cygwin however its not working ...

setting strings in gdb

c++: int main() { string a = "a"; ... ... } when i debug in gdb: (gdb) set var a = "ok" Invalid cast I run the program and pause at a break point after string a has been initialized. I'm trying to set its value, but it complains about invalid cast. What's the proper syntax for this? ...

setting a gdb exit breakpoint not working?

I've set breakpoints on exit and _exit and my program (multithreaded app, running on linux 2.6.16.46-0.12 sles10), is somehow still exiting in a way I can't locate (gdb) c ... [New Thread 47513671297344 (LWP 15279)] [New Thread 47513667103040 (LWP 15280)] [New Thread 47513662908736 (LWP 15281)] Program exited with code 0177. (gdb) t...

C++ Netbeans debugging issues

hi all ,I installed netbeans6.7.1 ide for c/c++ also i have mingw/msys cygwin installed and i have given C:\Msys\bin as environment variable path.It has gdb7 version.However wheni run dbugging thru netbeans it prompts that GDB version 0 not supported on this platform.Pls help I have made the project from existing files by giving netbeans...

tell gdb to disassemble "unknown" code

hi, is it possible to configure gdb in order to debug assembly code when there are no debug symbols or no sources available ? I mean showing assembly instruction by assembly instruction when performing a step by step debug (next /step commands) (not desassembling all the function. just the next instruction that will be executed) Regards...

Can one configure gdb/ddd to never step into certain functions?

I have some infrastructure C++ code (containers, memory managers etc.) and I want the debugger to never step into those methods while debugging an application issue. I know this can be done with Visual Studio and I have used that before on other projects: http://stackoverflow.com/questions/626744/is-there-a-way-to-automatically-avoidin...

breakpoints in GDB

Hi all, I think this may have been asked earlier but i can't find one that satisfied my requirements. I am debugging(infact trying to understand) a large project by trying to analyze the code flow in various testsuites. But when i try to set breakpoints at some files, i get the error "no source file named filename found". So my quest...

[C++] gdb shows gibberish values for class members, despite working code

I ran in to a (in my eyes) very strange issue with gdb today, while trying to write a more C++-ish version of the reverse() method of my string class (all for learning, of course). Despite having a proper default constructor that initializes all member variables to 0, they start out as gibberish inside the member reverse() - according to...