Hi JUCE-team,
could you please replace
#define JUCE_BREAK_IN_DEBUGGER { ::kill (0, SIGTRAP); }
with
#define JUCE_BREAK_IN_DEBUGGER { asm("int $3"); }
in juce_core/system/juce_PlatformDefs.h?
VS Code can handle this much better and I change it all the time after pulling JUCE.
Thanks!
Best, equinox
1 Like
oli1
June 5, 2023, 8:47am
2
This won’t work on non-x86 platforms but I think this is a good idea.
kcoul
June 6, 2023, 1:59am
3
Maybe it would be possible to wrap both in a platform-detection switch?
oli1
June 6, 2023, 8:56am
4
Most compilers support __builtin_trap()
, we should be able to use that for ARM platforms.
2 Likes
__builtin_trap();
works even nicer than asm("int $3")
for me here.
asm("int $3")
points somehow allways three lines wrong which is not the case for the builtin_trap.
Oh but __builtin_trap()
seems to kill the program, with asm("int $3")
I am able to move on with F5… So at least for my setup asm("int $3")
is to be the best.
Please see this excellent snippet:
/* Debugging assertions and traps
* Portable Snippets - https://github.com/nemequ/portable-snippets
* Created by Evan Nemerson <evan@nemerson.com>
*
* To the extent possible under law, the authors have waived all
* copyright and related or neighboring rights to this code. For
* details, see the Creative Commons Zero 1.0 Universal license at
* https://creativecommons.org/publicdomain/zero/1.0/
*/
#if !defined(PSNIP_DEBUG_TRAP_H)
#define PSNIP_DEBUG_TRAP_H
#if !defined(PSNIP_NDEBUG) && defined(NDEBUG) && !defined(PSNIP_DEBUG)
# define PSNIP_NDEBUG 1
#endif
#if defined(__has_builtin) && !defined(__ibmxl__)
# if __has_builtin(__builtin_debugtrap)
# define psnip_trap() __builtin_debugtrap()
This file has been truncated. show original