mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-03 08:57:18 +08:00
cpukit/sapi/src: removed macro, made asm() global at file scope and changed python script being loaded
This commit is contained in:
committed by
Amar Takhar
parent
c76f41afd3
commit
362deb38dc
+13
-16
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user