Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-06-03 Thread Stephan Bergmann
On 05/31/2013 09:33 PM, Tom Tromey wrote: Tom I think it may be fixable in GCC. I filed a GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57487 You can CC yourself on it if you want to see what happens. Great, thanks. (So your idea would be to, in a second step, teach ABRT to

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-06-03 Thread Tom Tromey
Stephan == Stephan Bergmann sberg...@redhat.com writes: Stephan Great, thanks. (So your idea would be to, in a second step, teach Stephan ABRT to issue additional gdb commands besides backtrace in case the Stephan trace contains __gnu_cxx::__verbose_terminate_handler, right?) If that GCC bug

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-06-03 Thread Stephan Bergmann
On 06/03/2013 04:36 PM, Tom Tromey wrote: Stephan == Stephan Bergmann sberg...@redhat.com writes: Stephan Great, thanks. (So your idea would be to, in a second step, teach Stephan ABRT to issue additional gdb commands besides backtrace in case the Stephan trace contains

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-05-31 Thread Tom Tromey
Tom I think it may be fixable in GCC. I filed a GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57487 You can CC yourself on it if you want to see what happens. Tom ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-05-30 Thread Stephan Bergmann
On 02/20/2013 10:28 PM, Tom Tromey wrote: FWIW we have the same problem in reverse: the gdb group at Red Hat is, among other things, tasked with improving the C++ debugging experience. However, most of us don't actually debug C++ programs on a regular basis. We do know some issues, via bugzilla

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-05-30 Thread Tom Tromey
Stephan == Stephan Bergmann sberg...@redhat.com writes: Stephan It would be cool if there were a way to see that message in the gdb Stephan backtrace. Like __gnu_cxx::__verbose_terminate_handler assembling the Stephan message and then calling a not-optimized-away helper function with the

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-03-14 Thread Tom Tromey
Tom I think it isn't possible in general. When an exception is thrown, I Tom think all that can really be determined is the next catch point. Michael This would be perfect. Explicit rethrows are relatively rare in Michael our code, however it is completely normal to have code that we Michael

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-03-13 Thread Michael Meeks
Hi Tom, On Tue, 2013-02-26 at 14:23 +0100, Jan Holesovsky wrote: Michael Even better than this would (perhaps) be a break inside thrower that Michael is caught here type breakpoint - that we could invoke to land us in Michael whatever code is going to throw as it does that [ and

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-27 Thread Tom Tromey
Tom == Tom Tromey tro...@redhat.com writes: Tom The various low-level exception-related functions, like __cxa_throw, Tom treat the exception object as a void *. However, the value of this Tom seems to change depending on the throw point. It's clear that this Tom can't always be the argument to

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-26 Thread Stephan Bergmann
On 02/22/2013 07:14 PM, Tom Tromey wrote: I'm curious what types of exceptions are actually thrown in LibreOffice. Does it throw -- scalars? Objects? Just pointers (Java style)? LibreOffice's UNO component system has a large exception hierarchy, which is modeled as a hierarchy of classes in

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-26 Thread Jan Holesovsky
Hi Tom, Tom Tromey píše v Pá 22. 02. 2013 v 11:14 -0700: Michael Even better than this would (perhaps) be a break inside thrower that Michael is caught here type breakpoint - that we could invoke to land us in Michael whatever code is going to throw as it does that [ and before it started

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-22 Thread Michael Meeks
Hi Tom, On Wed, 2013-02-20 at 14:28 -0700, Tom Tromey wrote: FWIW we have the same problem in reverse: the gdb group at Red Hat is, among other things, tasked with improving the C++ debugging experience. However, most of us don't actually debug C++ programs on a regular basis. We do know

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-22 Thread Tom Tromey
Michael == Michael Meeks michael.me...@suse.com writes: Michael The basic debugging experience in these an exception broke Michael something flows is that we get an exception thrown that Michael ultimately ends up in a pathalogical situation - an abort, or Michael some similar horrible badness.

Re: Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-20 Thread Tom Tromey
Lubos == Lubos Lunak l.lu...@suse.cz writes: Tom Is there something we could do to improve it? Lubos I don't know how much control gdb over exception handling has, Lubos so I don't know :). :-) FWIW we have the same problem in reverse: the gdb group at Red Hat is, among other things, tasked

Re: using backtrace() in exception throwing?

2013-02-19 Thread Noel Grandin
On 2013-02-18 19:30, Tom Tromey wrote: Noel == Noel Grandin noelgran...@gmail.com writes: Noel Would be nice if gdb could actually do catch throw XXXException like Noel the documentation says - perhaps the documentation was modified Noel prematurely? Yeah, I think it was. The docs have been

Re: using backtrace() in exception throwing?

2013-02-19 Thread Miklos Vajna
On Tue, Feb 19, 2013 at 10:13:15AM +0200, Noel Grandin n...@peralex.com wrote: While we're on the subject of GDB improvements, I personally would find a step return command very useful. i.e. continue until we leave the current stack frame very useful when you've stepped into something and you

Re: using backtrace() in exception throwing?

2013-02-19 Thread Noel Grandin
On 2013-02-19 10:23, Miklos Vajna wrote: On Tue, Feb 19, 2013 at 10:13:15AM +0200, Noel Grandin n...@peralex.com wrote: While we're on the subject of GDB improvements, I personally would find a step return command very useful. i.e. continue until we leave the current stack frame very useful

Gdb support for exceptions (Re: using backtrace() in exception throwing?)

2013-02-19 Thread Lubos Lunak
On Monday 18 of February 2013, Tom Tromey wrote: Lubos == Lubos Lunak l.lu...@suse.cz writes: Lubos This could be very useful ('catch throw' is so cumbersome in Lubos gdb), Is there something we could do to improve it? I don't know how much control gdb over exception handling has, so I

Re: using backtrace() in exception throwing?

2013-02-18 Thread Lubos Lunak
On Sunday 17 of February 2013, Noel Grandin wrote: Hi Background: I'm looking at bug reports, and the messages are generally only marginally useful, because I generally have no idea where the original exception was actually thrown from. Sometimes the message in the exception will narrow it

Re: using backtrace() in exception throwing?

2013-02-18 Thread Noel Grandin
On 2013-02-18 15:39, Lubos Lunak wrote: This could be very useful ('catch throw' is so cumbersome in gdb), but I think the first thing to check is if it would actually work. Last time I checked, recent features like -fvisibility make backtrace() very often generate call traces that are next to

Re: using backtrace() in exception throwing?

2013-02-18 Thread Tom Tromey
Lubos == Lubos Lunak l.lu...@suse.cz writes: Lubos This could be very useful ('catch throw' is so cumbersome in Lubos gdb), Is there something we could do to improve it? Lubos but I think the first thing to check is if it would Lubos actually work. Last time I checked, recent features like

Re: using backtrace() in exception throwing?

2013-02-18 Thread Noel Grandin
On Mon, Feb 18, 2013 at 7:09 PM, Tom Tromey tro...@redhat.com wrote: Lubos == Lubos Lunak l.lu...@suse.cz writes: Lubos This could be very useful ('catch throw' is so cumbersome in Lubos gdb), Is there something we could do to improve it? Would be nice if gdb could actually do catch

Re: using backtrace() in exception throwing?

2013-02-18 Thread Tom Tromey
Noel == Noel Grandin noelgran...@gmail.com writes: Noel Would be nice if gdb could actually do catch throw XXXException like Noel the documentation says - perhaps the documentation was modified Noel prematurely? Yeah, I think it was. The docs have been changed to reflect reality. Actually

using backtrace() in exception throwing?

2013-02-17 Thread Noel Grandin
Hi Background: I'm looking at bug reports, and the messages are generally only marginally useful, because I generally have no idea where the original exception was actually thrown from. Sometimes the message in the exception will narrow it down a little, but that still often leaves a lot of