I'm debugging a Mac OS X kernel via a remote target (target remote-kdp) when it gets into a kernel panic. I can introspect the state of the machine at the time, but if I need to restart the machine I have to do a hard power down, which involves direct physical access. This means I can't script introspecting kernel panics.
Is it possible...
I compiled my library (specifically protbuf-2.3.0) using -g -O0 on a SunOS 5.10.
A sample line in the make log is this:
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pthreads -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O0 -MT text_format.lo -MD -MP -MF .deps/text_for...
I'm outside gdb's target executable and I don't even have a stack that corresponds to that target. I want to single-step anyway, so that I can verify what's going on in my assembly code, because I'm not an expert at x86 assembly. Unfortunately, gdb refuses to do this simple assembly-level debugging. It allows me to set and stop on app...
In XCode, there doesn't seem to be an obvious way to do this. Visual Studio's debugger provides a keyboard shortcut which sets a temporary breakpoint on the line selected in the code window, runs the debugger to that point, and then removes the breakpoint. In XCode, it seems that you have to manually set and remove the breakpoint to ac...
During many, sometimes inundating, debugging sessions using DDD, I stumble upon loops. And I keep pressing next to get past it, and if there are many iterations, I just set a break point right after it, and press "continue." Is there any other way to go past loops?
...
Hello every body! I'm playing with OpenCV in Cocoa program. When I try to call the method with some OpenCV code in the second thread I get "Previous frame inner to this frame (gdb could not unwind past this frame)"
...
On a large C application, I have set a hardware watchpoint on a memory address as follows:
(gdb) watch *0x12F5D58
Hardware watchpoint 3: *0x12F5D58
As you can see, it's a hardware watchpoint, not software, which would explain the slowness.
Now the application running time under debugger has changed from less than ten seconds to one h...
I have some debugging code that if executed while running with GBD attached should break the execution of the application, but if GDB is not running it should continue.
The code I'm working with looks something like this in structure:
try
{
if( some_complex_expression )
{
gdb_should_break_here();
do_some_stuff();
thr...
I have installed GDB 7.0 and python per the following instructions. In the same manual, there is a mention of this file stl-views-1.0.3.gdb. What confuses me is where it should be placed in order to enable pretty printing of stl containers. Would someone also explain to me all of this work?
Thanks
...
Hi
I have a question about debugging a running C++ program in Linux. If a programming is already running and can't be interrupted, how to do that.
I can find three ways, but I don't know too much about details, I am grateful if any one can elaborate it deeper.
1) we can use GDB by specifying the process ID
gdb -p PID
In this case...
I have a program written in C++, on Linux, compiled with -g.
When I run it under gdb, I can
1) set breakpoints
2) at those breakpoints, print out variables
3) see the stackframe
4) given a variable that's a structure, print out parts of the structure (i.e. how ddd displays information).
Now, given that my program is compiled with "-g...
Hi,
I have these 3 file in my program:
sample1.h (method in sample1.cpp are defined here)
sample1.cpp (all the actual implementations)
demo.cpp (I am using the methods in sampe1.cpp here, and have included sample1.h)
Now, I am using GDB to debug and I know the basic commands like "break lineno." or "break methodname". But, how do I...
I have been using the macro solution, as it is outlined here. However, there is a mention on how to view them without macros. I am referring to GDB version 7 and above.
Would someone illustrate how?
Thanks
...
Hello,
I'm in an interesting problem.I forgot I'm using 64bit machine & OS and wrote a 32 bit assembly code. I don't know how to write 64 bit code.
This is the x86 32-bit assembly code for Gnu Assembler (AT&T syntax) on Linux.
//hello.S
#include <asm/unistd.h>
#include <syscall.h>
#define STDOUT 1
.data
hellostr:
.ascii "hello w...
I am trying to download libstdc++-v3/python to enable pretty printing of stl containers. However, my provider returns: svn: Unknown hostname 'gcc.gnu.org' error. This is the command:
svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
Is there an alternative way to get this package?
...
Is it possible... when the debugger is stopped at a breakpoint, to modify the value of a std::string variable without resorting to hacks like tweaking the memory image of the current buffer?
e.g. something like "set var mystring="hello world"
?
...
Hi,
while debugging a C++ program with GDB, is it possible somehow to add comments to the original souce code whitout affecting to the debugging process?
I started to debug with GDB, but if I modify (just adding comments at the end of each C++ code line wiht //) the code, when I display the code in GDB I get weird display.
Thanks
...
Hi,
I am debugging with GDB a crunching number C++ program. It takes 10 minutes till I reach the interesting function to be debugged. Then I inspect variables, understand parts of the program and recompile again, and run again GDB till I reach the point again.
This procedure is sometimes a bit time consuming. I wonder if somehow can be...
Hello!!
First of all... this is my message #1 in this place, so... please be nice with me ;)
I just started recently to study Gnome apps/libraries and I found that debuggers are an excellent way to learn, because seeing the code running helps a lot in understanding the structure of the program.
But I have a problem. For example, debug...
Hello
I want to write a script for gdb, which will save backtrace (stack) of process every 10 ms. How can I do this?
It can be smth like call graph profiling for 'penniless' (for people, who can't use any sort of advanced profiler).
Yes, there are a lot of advanced profilers. For popular CPUs and for popular OSes. Shark is very impres...