mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Print address of main on bluescreens
So we have at least some handle on the layout of the module/object's base address. Makes interpreting bare return addresses easier.
This commit is contained in:
@@ -100,6 +100,8 @@ void TickClient()
|
|||||||
Client::Ref().Tick();
|
Client::Ref().Tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]);
|
||||||
|
|
||||||
static void BlueScreen(String detailMessage, std::optional<std::vector<String>> stackTrace)
|
static void BlueScreen(String detailMessage, std::optional<std::vector<String>> stackTrace)
|
||||||
{
|
{
|
||||||
auto &engine = ui::Engine::Ref();
|
auto &engine = ui::Engine::Ref();
|
||||||
@@ -119,7 +121,7 @@ static void BlueScreen(String detailMessage, std::optional<std::vector<String>>
|
|||||||
crashInfo << "Date: " << format::UnixtimeToDate(time(NULL), "%Y-%m-%dT%H:%M:%SZ", false).FromUtf8() << "\n";
|
crashInfo << "Date: " << format::UnixtimeToDate(time(NULL), "%Y-%m-%dT%H:%M:%SZ", false).FromUtf8() << "\n";
|
||||||
if (stackTrace)
|
if (stackTrace)
|
||||||
{
|
{
|
||||||
crashInfo << "Stack trace:\n";
|
crashInfo << "Stack trace; main is at 0x" << Format::Hex() << intptr_t(main) << ":\n";
|
||||||
for (auto &item : *stackTrace)
|
for (auto &item : *stackTrace)
|
||||||
{
|
{
|
||||||
crashInfo << " - " << item << "\n";
|
crashInfo << " - " << item << "\n";
|
||||||
|
Reference in New Issue
Block a user