gdb

What tools do you use to develop C++ applications on Linux?

I develop C++ applications in a Linux environment. The tools I use every day include Eclipse with the CDT plugin, gdb and valgrind. What tools do other people use? Is there anything out there for Linux that rivals the slickness of Microsoft Visual Studio? ...

gdb linux arm

Hello, I have a ARM11 based hardware board which runs a Linux kernel ver. 2.6.21.5-cfs-v19. I have my application running on this ARM-LINUX board. To do sourlce level debugging, of my application i used to use gdb from command prompt of the linux board, that was with some earlier version of the board linux version. With this version ...

Sending messages to objects while debugging Objective-C in gdb, without symbols.

I'm trying to send messages to Objective-C objects in gdb. (gdb) p $esi $2 = (void *) 0x1268160 (gdb) po $esi <NSArray: 0x1359c0> (gdb) po [$esi count] Target does not respond to this message selector. I can't send any message to it. Am i missing something? Do I really need the symbols, or something else? Thanks in advance! ...

Can I set a breakpoint on 'memory access' in GDB?

I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes. ...

Confused by gdb print ptr vs print "%s"

1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1); (gdb) n 1168 if (!ptr) { (gdb) print ptr $1 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) print &cwd $2 = (char (*)[3500]) 0xbff2d96c (gdb) print strlen(cwd) $3 = 36 (gdb) print "%s",cwd $4 = "/media/MMC-SD/partition1/aaaaaaaaaaa", '\0' <repeats 912 times>, "��O�001\...

compiling gdb

Hello, I am trying to build gdb for armv6 architecture. I will be compiling this package on a Fedora Linux-Intel x86 box. I read the process of installing the gdb , like 1.) Download the source pachage 2.) run configure -host 3.) make But i got lost in the process because i was not able to make out what will be the host , target, n...

debug an embedded system containing gdb remotely using some kind of gui.

I would like to debug an embedded system containing gdb remotely using some kind of gui (ie like ddd). The embedded system does not have the sources or build symbols. However my local x windows box has. However the execution must happen on the embedded system. How can I from my development box drive gdb remotely with some gui ? leds an...

How do you start running the program over again in gdb with 'target remote'?

When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command target localhost:3210', how do you start the program over again without quitting and restarting your gdb session? ...

Multithreaded Debugger

GDB has severe issues when debugging with multiple threads (pthreads). Are there any other good multi-threaded debuggers for C/C++ on *nix? ...

C++ gdb GUI

Briefly: Does anyone know of a GUI for gdb that brings it on par or close to the feature set you get in the more recent version of Visual C++? In detail: As someone who has spent a lot of time programming in Windows, one of the larger stumbling blocks I've found whenever I have to code C++ in Linux is that debugging anything using comm...

Is there an alternative to gdb for Linux systems?

Please consider both commercial and free debuggers. Would like to see also the pros and cons for each. ...

How do I prepend a directory the library path when loading a core file in gdb on Linux

I have a core file generated on a remote system that I don't have direct access to. I also have local copies of the library files from the remote system, and the executable file for the crashing program. I'd like to analyse this core dump in gdb. For example: gdb path/to/executable path/to/corefile My libraries are in the current d...

What is a heuristic fencepost?

And why does gdb seem to "hit" it? ...

How Does The Debugging Option -g Change the Binary Executable?

When writing C/C++ code, in order to debug the binary executable the debug option must be enabled on the compiler/linker. In the case of GCC, the option is -g. When the debug option is enabled, how does the affect the binary executable? What additional data is stored in the file that allows the debugger function as it does? ...

gdb: how to set breakpoints on future shared libraries with a --command flag

I'm trying to automate a gdb session using the --command flag. I'm trying to set a breakpoint on a function in a shared library (the Unix equivalent of a DLL) . My cmds.gdb looks like this: set args /home/shlomi/conf/bugs/kde/font-break.txt b IA__FcFontMatch r However, I'm getting the following: shlomi:~/progs/bugs-external/kde/font...

How to print wstring in gdb

How can I print wstring in gdb? ...

Solaris Core dump analysis

I use pstack to analyze core dump files in Solaris How else can I analyze the core dump from solaris? What commands can be used to do this? What other information will be available from the dump? ...

What does the GDB backtrace message "0x0000000000000000 in ?? ()" mean?

What does it mean when it gives a backtrace with the following output? #0 0x00000008009c991c in pthread_testcancel () from /lib/libpthread.so.2 #1 0x00000008009b8120 in sigaction () from /lib/libpthread.so.2 #2 0x00000008009c211a in pthread_mutexattr_init () from /lib/libpthread.so.2 #3 0x0000000000000000 in ?? () The program has ...

How do you use gdb to debug your code?

As a developer, how do you use gdb to track down bugs within your code? What techniques tricks do you use to make your life easier? ...

.gdbinit config file conflict with Xcode debugging

I've a fairly huge .gdbinit (hence not copied here) in my home directory. Now if I want to debug code inside Xcode I get this error: Failed to load debugging library at: /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib Custom data formatters are disabled....