From 138c0e6c7dd22e45cb3d90de1c15ebf555899574 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 15 Jun 2026 19:32:56 +0200 Subject: [PATCH] Added IM_DEBUG_BREAK() handler for GCC+AArch64/ARM64. --- docs/CHANGELOG.txt | 2 ++ imconfig.h | 2 +- imgui_internal.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index eb1e84202..17a4b060a 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -80,6 +80,8 @@ Other Changes: - Demo: - Extract 'Widgets->Tree Nodes->Selectable Nodes' out of the 'Advanced' demo for clarity (manual reimplementation of basic selection). +- Misc: + - Added IM_DEBUG_BREAK() handler for GCC+AArch64/ARM64. [@tom-seddon] - Backends: - OpenGL3: - GLSL version detection assume GLSL 410 when GL context is 4.1. diff --git a/imconfig.h b/imconfig.h index 0a4ca08af..851a44b1b 100644 --- a/imconfig.h +++ b/imconfig.h @@ -55,7 +55,7 @@ //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available //---- Enable Test Engine / Automation features. -//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_config.h", see Test Engine for details. +//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_imconfig.h", see Test Engine for details. //---- Include imgui_user.h at the end of imgui.h as a convenience // May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included. diff --git a/imgui_internal.h b/imgui_internal.h index 1b5c09ab2..e6644799e 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -322,6 +322,8 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer #define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01") #elif defined(__GNUC__) && defined(__arm__) && !defined(__thumb__) #define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0") +#elif defined(__GNUC__) && defined(__aarch64__) +#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xd4200000") // GDB needs 'set $pc=($pc+4)' to skip this :( #else #define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger! #endif