Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Third time's the charm.  Apologies if you've seen this a lot.

Mark Wielaard pointed out this note to me.
Feel free to CC 'archer@sourceware.org' on hacks like this, we're
interested in hearing about them and to find out what developers need
from gdb.

Michael> since my smoketest failed again today, i've distracted myself a bit
Michael> with GDB Python scripting, the result of which is a command that can
Michael> break when an exception is thrown, but only if a certain function
Michael> (which is given as parameter) is on the stack.

Nice.

Michael> seems to work, but it is quite slow: finding the smoketest exception
Michael> in SfxBaseModel::getTitle takes GDB 4 minutes of CPU time.

Michael> now probably somebody will tell me that i'm too stupid to RTFM and
Michael> there is a much simpler way to do this :)

There isn't a simpler way right now.  You could try to do it by having a
breakpoint on the function you care about that keeps a count of entries
and exits and enables the __cxa_throw breakpoint if this is nonzero.
However, this is hard to do reliably right now, because you have to do a
lot of manual management of return breakpoints.  I think this may get
simpler when the "finish breakpoint" feature goes in:

http://sourceware.org/ml/gdb-patches/2011-10/msg00394.html

We're interested in hearing about real-life uses of exceptions and what
better functionality gdb could provide.  Freely file feature requests in
gdb bugzilla; enhancing C++ development is a primary goal of ours these
days.

thanks,
Tom

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.