From 713658798dfafabcd0a74f510c1639f6e3c9c820 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 23 Jan 2019 17:08:27 +0100 Subject: GDB pretty printers: f_inst and f_val. --- lib/birdlib.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/birdlib.h') diff --git a/lib/birdlib.h b/lib/birdlib.h index 7cd78032..6fcc202f 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -164,6 +164,15 @@ void debug(const char *msg, ...); /* Printf to debug output */ #define ASSERT(x) do { if (!(x)) log(L_BUG "Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0) #endif +#ifdef DEBUGGING +asm( + ".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n" + ".byte 1\n" /* Python */ + ".asciz \"bird-gdb.py\"\n" + ".popsection\n" + ); +#endif + /* Pseudorandom numbers */ u32 random_u32(void); -- cgit v1.2.3