Noel Grandin
70accc2904
loplugin:logexceptionnicely in toolkit..unoxml
...
Change-Id: I0a3126545f9ef98640f6dd166290e9b9e91b8355
Reviewed-on: https://gerrit.libreoffice.org/74244
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-06-18 10:31:43 +02:00
Stephan Bergmann
d3581eb79e
AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)
...
__cxa_demangle uses malloc/free for memory management, see
<http://itanium-cxx-abi.github.io/cxx-abi/abi.html#demangler >
Change-Id: I57f8465d1c70fbef4537068fd3aefc52295e1c63
Reviewed-on: https://gerrit.libreoffice.org/71942
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2019-05-08 13:20:06 +02:00
Noel Grandin
5e38da867f
fix leak in exceptionToString
...
need to release the pointer we get back from demangle
Change-Id: I74f1065006fe0cd5da79d0ec5caa514d216be9a1
Reviewed-on: https://gerrit.libreoffice.org/71859
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-05-07 08:31:35 +02:00
Gabor Kelemen
83abdf803a
tdf#42949 Fix IWYU warnings in tools/
...
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I47974f5c24819eb60e6724f42d51bb206dc26d21
Reviewed-on: https://gerrit.libreoffice.org/71557
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-04-30 15:02:42 +02:00
Noel Grandin
183debd7e0
pretty up logging of exceptions
...
Add exceptionToString() and getCaughtExceptionAsString() methods in
tools.
Use the new methods in DbgUnhandledException()
Add special-case case code for most of the exceptions that contain extra
fields, so all of the relevant data ends up in the log
Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece
Reviewed-on: https://gerrit.libreoffice.org/67857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-02-19 09:39:48 +01:00
Noel Grandin
9cceba9a92
make DBG_TESTSOLARMUTEX available in assert builds
...
where our QA people are more likely to trigger it
Change-Id: I4ce7c8c72e7e21f2296c0f9cc9f019aaef32ed0b
Reviewed-on: https://gerrit.libreoffice.org/58170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-07-30 08:58:59 +02:00
Noel Grandin
8dcbfb8c70
demangle context type name in DBG_UNHANDLED_EXCEPTION
...
Change-Id: I59591d0209ddf2bcf6e57a78dc7999d773b73ae3
Reviewed-on: https://gerrit.libreoffice.org/54805
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-05-26 15:51:07 +02:00
Noel Grandin
e075ee967d
give DBG_UNHANDLED_EXCEPTION_WHEN an area parameter
...
and rename it to DBG_UNHANDLED_EXCEPTION, to make it more like
the SAL_WARN-type macros.
Use some macro magic to deal with different numbers of arguments.
Update the sallogareas plugin to check the area parameter of
DBG_UNHANDLED_EXCEPTION.
Change-Id: Ie790223244c3484f41acb3679c043fb9b438e7c4
Reviewed-on: https://gerrit.libreoffice.org/52073
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-04-02 08:58:08 +02:00
Jochen Nitschke
959496794c
cleanup osl/diagnose.h includes
...
with command
> git grep -l osl/diagnose.h *.cxx |
xargs grep -L -w 'OSL_\w*' |
xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'
headers need more work
Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-09 15:41:46 +02:00
Eike Rathke
6c60aa313c
introduce DBG_UNHANDLED_EXCEPTION_WHEN for calls with an explanatory message
...
Change-Id: Ic80f2ed2c0fdff20d1ee1968bec2840bf914fb5e
2016-11-25 16:26:42 +01:00
Noel Grandin
27ecc40785
improve formatting of DBG_UNHANDLED_EXCEPTION message
...
put more useful info on the same line, and indent following lines, to
visually separate them from new log messages.
Change-Id: Ieda71aebf68420a0521ce98c621b0236d533bc53
2016-06-13 10:30:28 +02:00
Noel Grandin
6ab52cbb0e
reduce "no DbgTestSolarMutex function set" warning
...
Change-Id: I68c67e77a2759c8542dd4a44a78a9fcf8aa7dcc0
Reviewed-on: https://gerrit.libreoffice.org/26056
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-06-09 06:48:35 +00:00
Stephan Bergmann
1c4f33b5d8
loplugin:nullptr (automatic rewrite)
...
Change-Id: Ia5acfb564f913d52cd25b5d64d06b5280b94cb72
2015-11-10 10:31:54 +01:00
Noel Grandin
a3db4959b0
com::sun::star->css in tools/ and ucb/
...
Change-Id: I695ff721efd63b8ca0dd3c61ba5a4fef2c43cde6
Reviewed-on: https://gerrit.libreoffice.org/19854
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-11-09 11:14:44 +00:00
Tor Lillqvist
8ab005af96
Avoid pain when using selective debuginfo
...
Compile in the DbgUnhandledException function always.
Change-Id: I302954598e599e8db71967974b18ade54ca2de13
2015-09-08 19:37:58 +03:00
Tor Lillqvist
139b32b84c
Bin the fairly useless DbgDialog stuff and handle fallout
...
See (short) discussion on the mailing list, "How was it again, is the
DbgDialog useful?".
Change-Id: Ibde1eb13f16edf94f1f7aebd0befd1b0b171d5c4
2015-08-26 10:33:30 +03:00
Stephan Bergmann
8ca53be757
loplugin:cstylecast: deal with remaining pointer casts
...
Change-Id: Iedee28da32a4333a414e06877f87851345bb4e9b
2015-06-08 16:29:11 +02:00
Stephan Bergmann
9720e8e5ef
Some loplugin:revisibility clean-up
...
Stumbled across such redundant visibility re-specifications when looking at the
odd case of cppu_unsatisfied_iquery_msg declared CPPU_DLLPUBLIC in
cppu/source/cppu/cppu_opt.cxx and used in inline code in
include/com/sun/star/uno/Reference.hxx with only a declaration lacking
CPPU_DLLPUBLIC visible, and wondering how that actually works on Windows.
However, this plugin is probably not worth it being run all the time, so
committing it to compilerplugins/clang/store/.
Change-Id: Ibc3c4e7499213de1b419ce7eb85455cb832e1510
2015-01-05 13:10:48 +01:00
Stephan Bergmann
47cd375d88
Revert "Work around a Clang trunk (towards 3.6) -Werror,-Wunused-value"
...
This reverts commit 146bd125a0 ,
Clang's r224465 does not look really useful the way it is, so work around
that directly in Clang for now.
2014-12-18 11:01:54 +01:00
Stephan Bergmann
146bd125a0
Work around a Clang trunk (towards 3.6) -Werror,-Wunused-value
...
Change-Id: I3ee32c5bd379bb851f8f255faa93d96227dcff84
2014-12-18 10:19:14 +01:00
David Ostrovsky
c2a93a21a5
long is 32 bit on Windows x86_64 platform
...
So that this is always wrong (on this platform) to write:
reinterpret_cast<foo>(reinterpret_cast<long>(bar))
it should be:
renterpret_cast<foo>(reinterpret_cast<sal_uIntPtr>(bar))
Change-Id: Ia286246ee1616988f755c2d2054b26efacc51af0
Reviewed-on: https://gerrit.libreoffice.org/13366
Reviewed-by: Michael Stahl <mstahl@redhat.com >
Tested-by: Michael Stahl <mstahl@redhat.com >
2014-12-10 21:35:43 +00:00
Noel Grandin
23e1fc277d
loplugin: cstylecast, update PTR_CAST macro to use static_cast
...
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.
Signed-off-by: Stephan Bergmann <sbergman@redhat.com >,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx
Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-09-23 17:27:47 +02:00
Noel Grandin
34cabe837d
loplugin:unreffun
...
Change-Id: Idc0f3ef53f48b2e77e4cecbcdbbc44a115c6ec2e
2014-07-14 13:27:30 +02:00
Thomas Arnhold
8449225508
fix-includes.pl: tools
...
Change-Id: I66b3dc79998de018eae1c7eff8ce23f95e3c3f33
2014-05-22 12:50:45 +02:00
Stephan Bergmann
747631f26c
Remove now unused obsolete tools/debug.hxx functionality
...
Change-Id: I1bc585af8f0189dfa219bd42a5f09871a006c6ea
2014-03-31 13:33:59 +02:00
Stephan Bergmann
f26b981aa2
Remove now unused DBG_CTOR etc. feature
...
Change-Id: Id5e3191ea1a505bd7d46af355edb99e184b5fcb1
2014-03-28 17:26:09 +01:00
Stephan Bergmann
cdb473b00a
Remove now unused tools/debug.hxx profiling functionality
...
Change-Id: I13adca8c2f929c8a9226b26ef57b26363dfdf0b3
2014-03-25 18:49:18 +01:00
Stephan Bergmann
2ab3bae2cf
Reduce some functions to local
...
Change-Id: Ia2d7eaaa1381fe46839b0d52a91bdc3a439fa418
2014-03-25 18:49:17 +01:00
Stephan Bergmann
86088dda6e
osl_setDetailedDebugMessageFunc is effectively doing nothing
...
...since the osl/diagnose.h macros got rebased onto sal/log.hxx, so remove the
corresponding tools/debug.h functionality.
Change-Id: Ife4b5b1a2608230d0dbfc3fa8852243c89ed292f
2014-03-25 16:17:09 +01:00
Stephan Bergmann
ff1a592a1f
Remove unused DBG_FUNC_* slots
...
Change-Id: Ief6661ed4bb57546014deef5b10d20fc3a4894fe
2014-03-25 16:17:09 +01:00
Stephan Bergmann
3afc276001
DBG_OUT_WARNING is unused
...
...and thus DgbData::nWarningOut is unused, too.
Change-Id: I388d2be7dafbfdc173a731dc7daf1c8b5efcd61d
2014-03-25 16:17:06 +01:00
Stephan Bergmann
a61f3161a4
At least warn when DBG_TESTSOLARMUTEX has not been set up
...
Change-Id: I5ae5318685ffe45bd9616d06eea21a93585715f2
2014-02-03 16:05:09 +01:00
Tor Lillqvist
38b4030703
Avoid warnings: unused parameter
...
Change-Id: I92fd33e020772eac735f133f467207da9635e9b4
2014-01-16 23:22:44 +02:00
Bjoern Michaelsen
43bfe1ecb8
always build an empty DbgUnhandledException, to allow debug=t builds without --enable-dbgutils
2014-01-16 21:45:17 +01:00
Stephan Bergmann
3abb11b346
Use bool
...
Change-Id: I7b48d8b9e162f9e4447bfcfcc0bbd1158bd35f5b
2014-01-10 17:11:49 +01:00
Tor Lillqvist
a7724966ab
Bin comments that claim to say why some header is included
...
They are practically always useless, often misleading or obsolete.
Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Stephan Bergmann
f58ee783ee
Improve ErrorCodeIOException messages
...
...and clean up some includes.
Change-Id: Ia5843cd38f967722d7173a6c87fba26064e3ffd6
2013-10-09 21:02:11 +02:00
Luboš Luňák
64b993e046
finish deprecation of O(U)String::valueOf()
...
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.
Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Norbert Thiebaud
710f41b7ae
Clean String and sal_Bool in tools
...
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com >
2013-06-30 04:58:49 +00:00
Noel Grandin
2cb247a12d
fix file and lineno info for DBG_UNHANDLED_EXCEPTION
...
which I broke in commit 863d38fbfa
"move DBG_UNHANDLED_EXCEPTION out of line"
Change-Id: Ic30e985cc356d81013ced1ce74ec6c78469d9882
2013-06-10 10:20:45 +02:00
Noel Grandin
6bf00f0f94
fix for linking
...
caused by my commit
863d38fbfa "move DBG_UNHANDLED_EXCEPTION out of line"
Change-Id: Idfd84d987ba9151ba476ce0516a9e5fbdb2003ec
2013-05-21 13:53:21 +02:00
Noel Grandin
863d38fbfa
move DBG_UNHANDLED_EXCEPTION out of line
...
makes it easier to set a breakpoint on it.
Plus it's getting a little big to be a macro.
Change-Id: I2827aa3618ba966fbc85a4a56e0e794a55630730
Reviewed-on: https://gerrit.libreoffice.org/3988
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org >
Tested-by: Fridrich Strba <fridrich@documentfoundation.org >
2013-05-21 10:02:39 +00:00
Stephan Bergmann
aa753f01ba
-Wunused-macros
...
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
Tor Lillqvist
d72a0b5c61
Check for __GNUC__ instead of GCC in sources
...
We still have checks for $(COM) being GCC or MSC in makefiles, of
course. But there is no reason to pass -D$(COM) to compilations.
Checking the built-in compiler-specific macros __GNUC__, _MSC_VER
(etc) is the right thing to do.
Change-Id: Ia961a29ba74e2c4977e5300a92318f38104c6592
2012-12-27 13:38:15 +02:00
Philipp Riemer
17d4bb38fa
cleanup files in tools/source
...
This is a follow-up patch of 7710faa45640d25a83136a35044aafdb1b168d88.
Change-Id: I1f54cbe5c3170e9a79e11e9b9c1da3791419a4ba
2012-08-19 21:27:00 +02:00
Philipp Riemer
920dcaec05
re-indent falsely formatted code in tools/source
...
Change-Id: Ibc26313e79dd5f992c4bfb9454a9798fb1a78f00
2012-08-18 18:33:54 +02:00
Philipp Riemer
42352dff5a
removed ascii-art and blank lines in tools/source
...
Change-Id: I3f95d12a8c325c96c586253b5d9bb7dce24c0858
2012-08-18 18:33:50 +02:00
Oliver Günther
c8b7aa5513
fdo#39468: Translated German comments in core/tools
...
Change-Id: I5b6fd5712f08dae180bdd3b57b63713946b82433
2012-08-13 21:37:02 +02:00
Mathieu Vonlanthen
85cb908453
fdo#48549 System::Beep() removal
...
Change-Id: I402202e199dfc8c2462859d00529f2782f6228b0
2012-07-31 10:28:57 +01:00
Michael Meeks
535e83550e
re-base on ALv2 code. Includes:
...
Avoid some uses of non portable #!/bin/bash in shell scripts.
Patch contributed by Pedro Giffuni
http://svn.apache.org/viewvc?view=revision&revision=1235297
remove redundant namespace, patch contributed Mathias Bauer
http://svn.apache.org/viewvc?view=revision&revision=1162610
removal of OS/2 port changes, and preferring our similiar
tools/inc/tools/solar.h DLLPOSTFIX cleanup.
i118595 - Removal of the use of getopt() from rscdep.
Patch contributed by Andre Fische
http://svn.apache.org/viewvc?view=revision&revision=1202270
2012-07-11 18:12:35 +01:00