gdb

Why does GDB says "Architecture of file not recognized"?

Hi All, I m using gdb on a aix shared lib running on aix 5.3? When i try to run gdb for this file i get a error message saying ""Architecture of file not recognized" Don't know how to get this fixed. Does anybody know why i get this message ""Architecture of file not recognized"?. gdb runs fine on other executables compiled by xlc. ...

How do you use gdb?

I decided to find out how our C/C+ *nix practitioners use the gdb debugger. Here is what I typically use: b - break filename.c:line #, function, filename.cpp:function, className::Member n, c, s -- next continue step gdb program name => set breakpoints ==> run [parameter list] (I do this to set break points before the program starts)...

Interfacing Eclipse Workbench UI with GNU debugger functions

Hello, I want to know how the Eclipse Workbench UI communicates with the GNU debugger. What I mean is in the Eclipse for C/C++, when we press the step over or resume or continue buttons in the menu, what happens behind the scenes? As in how is the GNU gdb invoked? How does gdb know which function to execute? How does the UI communicate ...

iPhone Device Debugging

Is it possible to actually use the Xcode debugger when running an iPhone app on the device rather than the simulator? i.e., can I have the device stop at breakpoints that I set in my code and step through the code as it runs on the device? EDIT: I should mention that I am a registered developer with Apple and have a valid certificate. I...

iphone development: Too many log on gdb

When i debug a programmer, I found too many lines useless info which appear in GDB. this kind of infomation may come from iphone framework. it is not logged by my code. the info like this Node 48 TrialMT(102,102,101,101) Node 58 TrialMT(102,102,101,101) Node 69 TrialMT(102,102,101,101) Node 72 TrialMT(102,102,101,101) Just too much....

Examining function return value in GDB

If I break in line 3: 1 int foo() 2 { 3 return func(); 4 } is there a way to examine the return value of func()? Thanks. ...

Debugging a clobbered static variable in C (gdb broken?)

...

Using GDB in xcode 3.1.2 - what does 'error while running hook_stop:' mean?

Pretty much a total newbie here, using xcode to write a c++ program. I don't know how to use gdb yet and I'm not sure how you can turn it off..(if you can?) Just added some openGL texture loading code and when I call it I get this error message in my console and the program freezes... what is happening? Here's the code that throws the...

Programmatic interaction with gdbserver

The gdbserver program allows for the remote debugging of programs. Typically, a local copy of gdb is used to interact with the remote gdbserver instance, and the program running under that remote gdbserver. My question is: Are there client implementations of the gdb remote serial protocol (RSP) that allow programs other than gdb to int...

Debug core file with no symbols

I have a C application we have deployed to a customers site. It was compiled and runs on HP-UX. The user has reported a crash and we have obtained a core dump. So far, I've been unable to duplicate the crash in house. As you would suspect, the core file/deployed executable is completely devoid of any sort of symbols. When I load i...

How does GDB find the symbol of a function when backtracing in MIPS Linux?

I'm trying to implement a function to backtrace a crashed user space process in kernel. Since, I'm working in Kernel, I don't have the luxury of any libraries and provided backtrace function doesn't support MIPS architecture. I'm just wondering if I can emulate what GDB does. The version of the kernel is 2.6.21. ...

passing a command to gdb when running a program

I am using gdb to debug a program, and I want to have the output of the command $(perl -e 'print "A"x20') as my argument. How can I do that? This way the argument would be very flexible. ...

"Error creating session" when attempting to debug application with Eclipse/CDT & gdb

Hey! I'm receiving a rather cryptic error when attempting to debug a simple C++ application. Message: "Error creating session" Stacktrace: org.eclipse.cdt.debug.mi.core.MIException: Process Terminated at org.eclipse.cdt.debug.mi.core.MISession.setup(MISession.java:232) at org.eclipse.cdt.debug.mi.core.MISession.<init>(MISess...

What useful GDB scripts have you used/written?

People use gdb on and off for debugging, of course there are lots of other debugging tools across the varied OSes, with and without GUI and, maybe other fancy IDE features. I would like to know what useful gdb scripts you have written and liked. While, I do not mean a dump of commands in a something.gdb file that you source to pull o...

Stopping the inferior process in GDB WITHOUT a signal?

Is there a way to stop the inferior without using Ctrl+C (or an equivalent signal sent from another process?) I'm using a windows platform and am managing GDB from another process, so with no notion of signals, it seems that there isn't a good way to break execution of my program when it's free running without any breakpoints. EDIT FOR...

gdb searching for source directories

how do i mention to gdb in unix to search for source files inside a single directory recursively for example if there are some different buiding blocks in one module. a is parent directory for b, c, d where b,c,d are child directories. and source files are distributed in b,c,b. i just have to mention to gdb that all the source files are...

Cygwin GDB gives error 193 when trying to start program.

When I attempt to debug a simple program with gdb on cygwin I get the following: C:\Users\Benoit St-Pierre\workspace_cpp\cs454>gdb a.exe GNU gdb 6.8.0.20080328-cvs (cygwin-special) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt; This is free software: you...

Eclipse-CDT: How do I configure the debugger to stop on an exception?

This might be a GDB question.. but I'd like to run my app in the debugger and have the debugger break when an exception is thrown, so I can see where the code is and what its doing at that time. I do this often in Visual Studio using the Debug -> Exceptions dialog, checking the 'Thrown' column beside the type of exceptions I'd like to s...

Run an Application in GDB Until an Exception Occurs

I'm working on a multithreaded application, and I want to debug it using GDB. Problem is, one of my threads keeps dying with the message: pure virtual method called terminate called without an active exception Abort I know the cause of that message, but I have no idea where in my thread it occurs. A backtrace would really be helpful....

Getting GDB to display the entirety of multi-line statements

GDB, at least as it's configured by default on my Ubuntu 9.04 box, doesn't handle multi-line statements well. When I'm stepping through code, GDB only displays the last line of the current statement, even if that statement spans multiple lines. I'm aware that I could use DDD or emacs as a frontend for GDB, but I'd prefer to solve this ...