Commit Graph
100 Commits
Author SHA1 Message Date
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
Thomas Arnhold b63027f099 Remove some unused defines and controls
Change-Id: I96f76ed6b33f5c786d1e3ab3981a535037a9c1b5
2012-06-29 15:59:53 +02:00
Stephan Bergmann e7f09c6e5b Remove some dated Windows-only debug stuff. 2012-01-20 12:14:44 +01:00
Caolán McNamara 988829d533 valgrind: update unused code post virtual dtor cmis fix 2012-01-11 14:13:30 +00:00
Marcel Metz 1efa072b55 Remove cruft in debug tools 2012-01-10 07:23:04 +01:00
Norbert Thiebaud 5f7649aead remove include of pch header from tools 2011-11-27 13:25:56 -06:00
Stephan Bergmann 0c7bff0271 Changed sal/log.h -> sal/log.hxx, drop _S from C++ streaming log macros.
A compile time check ensures the common case of streaming just a plain
C-style string literal still produces reasonably compact call-site code.
The format-string variants are still available in sal/detail/log.h, but
only to be used in obsolete osl/diagnose.h etc., and going to be removed
again eventually.
2011-11-23 15:50:58 +01:00
Stephan Bergmann 70a6b9ffbd New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
  cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
  addressed.
* Some replacements tools String -> rtl::OUString.
2011-11-22 09:41:47 +01:00
Francois Tigeot 64cf70b4e4 Remove some OS/2 code 2011-05-01 07:49:30 +02:00
Julien Chaffraix 8af99e5768 Fixed an off-by-one error in DbgOut.
"..." is actually 4 characters long due to the '\0' character and
strcpy does copy the '\0'. Thus we need to remove 4 from the length
to avoid writing one byte after the end of the buffer.
2011-04-19 09:48:04 +01:00