cpukit/sapi/src: removed macro, made asm() global at file scope and changed python script being loaded

This commit is contained in:
the-m3chanic
2024-08-05 21:29:58 +00:00
committed by Amar Takhar
parent c76f41afd3
commit 362deb38dc
+13 -16
View File
@@ -62,23 +62,23 @@ RTEMS_SECTION(".rtemsroset.copyright") const char _Copyright_Notice[] =
"Copyright (C) 1989, 2021 RTEMS Project and contributors";
/*
* Additional Macro to add custom section (.debug_gdb_scripts) to
* Additional a add custom section (.debug_gdb_scripts) to
* every ELF being built on RTEMS, in order to add auto-loading
* support for Python scripts (specifically, GCC's pretty-printing
* scripts), by in-lining the Python script in the section.
*/
#define DEFINE_GDB_PY() \
asm( \
".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n" \
".byte 4\n" \
".ascii \"gdb.inlined-script\\n\"\n" \
".ascii \"import sys\\n\"\n" \
".ascii \"import os.path\\n\"\n" \
".ascii \"sys.path.append(os.path.join(gdb.PYTHONDIR, 'rtems'))\\n\"\n" \
".ascii \"import rtems.stdcxx as stdcxx\\n\"\n" \
".byte 0\n" \
".popsection\n" \
)
asm( \
".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n" \
".byte 4\n" \
".ascii \"gdb.inlined-script\\n\"\n" \
".ascii \"import sys\\n\"\n" \
".ascii \"import os.path\\n\"\n" \
".ascii \"sys.path.append(os.path.join(gdb.PYTHONDIR, 'rtems'))\\n\"\n" \
".ascii \"import rtems.pprinter as pprinter\\n\"\n" \
".byte 0\n" \
".popsection\n" \
);
static Objects_Information *
@@ -121,9 +121,6 @@ static void rtems_initialize_data_structures(void)
_Scheduler_Handler_initialization();
_SMP_Handler_initialize();
/* Macro call to embed section in script for pretty-printing */
DEFINE_GDB_PY();
}
RTEMS_LINKER_ROSET( _Sysinit, rtems_sysinit_item );