Questions tagged [gdb]

Use this tag for problems related to or involving GDB, the standard debugger for the GNU software system.

The GNU Debugger, usually called just GDB and named gdb as an executable file, is the standard debugger for the GNU software system. It is a portable debugger that runs on many Unix-like systems and Microsoft Windows variants. GDB works for many programming languages, including C, C++, D, Go, Objective-C, Fortran, Java, OpenCL C, Pascal, assembly, Modula-2, and Ada.

Related Resources

11325 questions
6
votes
3 answers

How to debug windows executable in Linux

I am using Ubuntu 13.10. Is it possible to debug a windows executable under Linux? I've tried gdb, but it always throw me this error message. /bin/bash: line 0: exec: /some.exe: cannot execute: Permission denied
Znatz
  • 1,530
  • 2
  • 18
  • 31
6
votes
1 answer

Is there a way to get GDB to skip/ignore an instruction?

I'm running through some assembly code in GDB trying to debug my program and I'd like to see what happens if I ignore an instruction entirely, is there a way to do this? (skip past it to the next line without executing it) without having to edit the…
Riptyde4
  • 5,134
  • 8
  • 30
  • 57
6
votes
1 answer

How to Insert breakpoint while gdb is executing

I want to add some breakpoints while gdb is executing . How to suspend running gdb and insert breakpoint and continue from there . I tried ctrl+z , it kills the gdb process.
Avinash Kumar
  • 739
  • 2
  • 10
  • 25
6
votes
1 answer

Binary Bomb - Phase 4

I am having a very difficult time tracing the assembly code for the following binary bomb (An assignment from school where a bomb has to be defused, this bomb contains 6 phases which all have 1 correct input to proceed to the next phase). I am…
petrov
  • 1,085
  • 3
  • 12
  • 13
6
votes
1 answer

Android NDK solib-search-path on Windows using incorrect slashes

I'm trying to debug an NDK project on Windows using Eclipse (Kepler), but GDB won't find the symbols for the .so file, because the direction of the slashes in the search path are incorrect. Using NDK r9 and SDK 22.2.1, when I try and run the…
Andrew Porritt
  • 1,716
  • 15
  • 24
6
votes
5 answers

How do you debug a C program on Windows?

I've never used a debugger and the time has come to give them a try. MinGW appears to come with GDB which I've been trying to use. Supposdly running gdb from the command line and typing run myprog.exe starts the debugger but when I do this I get…
Celeritas
  • 14,489
  • 36
  • 113
  • 194
6
votes
1 answer

How to install GDB with Python support on Windows 7

I need to debug cython code. Official documentation says, I need to install "gdb 7.2 or higher, built with Python support". Unfortunately I didn't find any step-by-step guide how to install it on Windows 7. Do I have to build it myself (how?) or…
Apogentus
  • 6,371
  • 6
  • 32
  • 33
6
votes
1 answer

pretty printing boost::mpl::string<...> types in gdb

I use boost::mpl::string<...> types extensively... enough that it would really help with debugging to have the types pretty-printed in gdb. So... instead of gdb showing the individual (multicharacter literal) components like it currently does…
etherice
  • 1,761
  • 15
  • 25
6
votes
1 answer

Attaching to a remote process for debugging

Using Xcode 3.1 on OSX 10.5; is it possible to attach (the debugger) to a running remote process? I know that it's possible to start and debug a remote process (as explained here), but it would be great if I could find a way to attach to an already…
fuad
  • 4,265
  • 9
  • 34
  • 32
6
votes
1 answer

Printing multiple variables in GDB?

I am encountering a problem to print multiple variables (say 25) in a function on GDB Prompt. Is there any convenient way to do this instead of printing every variables manually ? can I have a script or a simpler way which can do my job ?
San
  • 905
  • 3
  • 16
  • 33
6
votes
1 answer

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.
user210129
6
votes
10 answers

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…
Elise van Looij
  • 4,162
  • 3
  • 29
  • 52
6
votes
1 answer

gcc 4.7.3 and gdb 7.6 on Mac - strange stepping problems

I recently installed GCC 4.7.3 and GDB 7.6 on my OS X 10.7 system via MacPorts to be able to compile C++11 code. I cannot use Apple's selfmade clang++ and gdb since it doesn't allow me to debug standard template library code properly (for example,…
Entropia
  • 154
  • 9
6
votes
1 answer

When using gdb to debug program, Is there any command output file descriptor information?

When I use gdb to debug a program, I want to look the file descriptor information about the debugging progress. I use "info file", "info proc" commands, but these command outputs don't include file descriptor information. So Is there any command…
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
6
votes
2 answers

Can GDB be used to print values of allocatable arrays of a derived type in Fortran 90?

I have the following data structure in a Fortran90 program: TYPE derivedType CHARACTER(100) :: name = ' ' INTEGER :: type = 0 REAL(KIND(1.0D0)) :: property = 0.0 END TYPE derivedType TYPE (derivedType), ALLOCATABLE,…
Neal Kruis
  • 2,055
  • 3
  • 26
  • 49