21 Commits

Author SHA1 Message Date
Shauren
9646bdddaf Core/Miscc: Add file/line/function information to ASSERT_NOTNULL 2025-10-28 13:43:16 +01:00
Ovahlord
38440996ee Core/Common: Use the [[unlikely]] keyword in all assert, warning and error macros to allow further compiler optimization (#29124) 2023-07-16 16:11:41 +02:00
Giacomo Pozzoni
2bc1bbd91d Common/Misc: Replace old macros with modern C++ attributes (#26613)
(cherry picked from commit 5ae2a0f47d)
2022-03-11 11:48:31 +01:00
jackpoz
f7c1ae01f8 Core/Common: Add macro ASSERT_WITH_SIDE_EFFECTS to be used when asserting conditions that have side effects
(cherry picked from commit 49da3533cd)
2022-01-19 21:18:39 +01:00
jackpoz
1fa4403b8c Core/Common: Allow to show a message when aborting
Add a new ABORT_MSG macro that allows to show a formatted message before stopping the executable

(cherry picked from commit 0ddee8a4a0)
2021-12-22 22:54:18 +01:00
Giacomo Pozzoni
d5c41d23e6 Core/Misc: Log more information in asserts (#22783)
* Core/Misc: Log more information in asserts

Add a new function GetDebugInfos() to types that could trigger an ASSERT() to easily include more useful information in crashlogs.
This is an initial commit that requires many more commits to implement the new GetDebugInfos() function in all required types.
If the type doesn't have the function, the global default one is picked which doesn't log anything.

* Core/Misc: Fix dynamic build

Add missing attribute for dynamic build

* Core/Misc: Fix gcc/clang build

* Core/Misc: Rename GetDebugInfos() to GetDebugInfo()

* Core/Misc: Fix FormatAssertionMessage() adding an extra '\0'

* Core/Misc: Add GetDebugInfo support to Unit

* Core/Misc: Add GetDebugInfo support to Creature

* Core/Misc: Add more info to GetDebugInfo for Creature

* Core/Misc: Add GetDebugInfo support to GameObject

* Core/Misc: Add GetDebugInfo support to Player

* Core/Misc: Add more GetDebugInfo info

* Core/Misc: Add GetDebugInfo support to Item

* Core/Misc: Add GetDebugInfo support to Bag

* Core/Misc: Add GetDebugInfo support to Transport

* Core/Misc: Add GetDebugInfo support to TempSummon, Minion, Guardian, Pet

* Core/Misc: Add GetDebugInfo support to Map, InstanceMap

* Core/Misc: Add GetDebugInfo support to Spell

* Core/Misc: Fix build warning

* Core/Misc: Add GetDebugInfo support to Aura

* Core/Misc: Add GetDebugInfo support to UnitAI

(cherry picked from commit 9a924fb9d5)
2021-11-16 20:36:58 +01:00
Shauren
d181c1da75 Core/CrashHandler: Include assertion messages in crash reports
(cherry picked from commit 62db1fb683)
2021-10-23 16:02:44 +02:00
jackpoz
89a232de3a Core/Misc: Add PERFORMANCE_PROFILING CMake option
Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance.
This option is unsupported, do not report any issue happening when enabling this option.

(cherry picked from commit db5c9867e2)
2021-08-08 21:21:34 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
d184768bbc Core/Misc: Improved error message reported by ASSERT_NOTNULL 2017-09-24 23:53:33 +02:00
Shauren
b8db320bf1 Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib) 2017-03-04 18:46:18 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Naios
501fd9b502 Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
2016-03-24 01:28:58 +01:00
Shauren
dea7d429ab Core/Debugging: Make abort() less bad on windows by forcing crash log generation 2016-03-03 17:29:48 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
d31706b07e Core/DBLayer: Improve error message from 0a27f8bce2 2015-11-13 22:43:36 +01:00
StormBytePP
958fd013e7 Core/Build: Add Trinity::Abort definition in header file 2015-09-21 15:31:49 +02:00
StormBytePP
0bed9d56cb Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert 2015-09-21 15:17:05 +02:00
StormBytePP
1d2aafd39b Core/Build: Merge common library and move database out of shared 2015-08-21 17:52:42 +02:00