All Questions
13 questions
3
votes
1
answer
159
views
Is it possible to pause C program inside SIGSEGV handler for further investigation?
I'm currently preparing my application for more real-world testing in order to catch all super rare and hard to reproduce edge cases. I've already installed SIGSEGV handler that prints backtrace to ...
10
votes
1
answer
591
views
How do debuggers manage to break on any throw?
In GDB and other debuggers it's possible to ask the debugger (using catch throw) to stop anytime an exception is thrown before the process passes said exception to the respective exception handler.
...
1
vote
3
answers
2k
views
rethrow exception preserving backtrace
I need to catch some "fatal" C++ exception, then flush logs and rethrow the former, with its own backtrace.
My current solution, however, displays (correctly) the wrong stacktrace.
#include &...
0
votes
2
answers
431
views
Specify a particular exception to stop GDB using catch
catch throw tells GDB to stop when an exception occurs. This has been discussed here.
However, I define a few exception types in my program, I need a way to tell GDB to only stop when one of my ...
0
votes
2
answers
2k
views
Emacs - GDB trace right to interrupt without stepping through all files
I am working on Pintos OS project. I get this message:
Page fault at 0xbfffefe0: not present error writing page in user context.
The problem with Pintos OS project is that it won't simply tell the ...
2
votes
1
answer
541
views
Step over a C++ throw statement in GDB
When debugging a C++ program with the GNU GDB debugger, I can step over the next line of code with the GDB command:
next
However, when an exception is thrown within that next line, like e.g.
throw ...
1
vote
1
answer
1k
views
gdb ARM Cortex-M exception Unwinding
I have been working with some Cortex-M4 (Freescale K60) devices with a compiled by me GCC (v4.7.2), BinUtils (v2.22), Newlib (v1.20) and GDB (v7.5). I have always been annoyed by GDB's inability to ...
11
votes
2
answers
7k
views
How to get backtrace information from exception in googletest?
I'm trying to do some semi test driven design, and occasionally when I implement a new feature, it will have an exception somewhere. All gtest tells me is what the exception is, and does not give me ...
37
votes
3
answers
19k
views
How do I get the value and type of the current exception in C++ in gdb?
gdb allows one to catch exceptions when they're thrown, and when they're caught. But sometimes the line an exception is thrown has no symbols, or a breakpoint is triggered during exception handling. ...
3
votes
1
answer
1k
views
Program freezes under gdb when exception occurs
I compiled with g++ a simple test program:
int main()
{
try
{
printf("before\n");
throw 1;
}
catch(int i)
{
printf("catched int\n");
}
catch(...)
{
printf("catched(...)...
2
votes
1
answer
361
views
Uncaught exception - debugging techniques (C++)
I have encountered a curious scenario in which the following unlikely code:
try{
throw Core::ValueError();
}
catch (Core::Error &e){
...
}
(ValueError inherits from Error inherits from std::...
5
votes
1
answer
317
views
slow down gdb to reproduce bug
I have a timing bug in my application which only occurs when I use valgrind, because valgrind slows down the process so much.
(it's actually a boost::weak_ptr-exception that I cannot localize)
Now I ...
29
votes
2
answers
10k
views
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 ...