zephyr/subsys/debug
Noah Pendleton 00d8870a50 debug: Set thread_info.c variables to const
The variables are usually placed into an output region located in FLASH
memory when linking, but the variables are not marked `const`, so the
section ends up with `W` writeable section flag:

```bash
❯ arm-zephyr-eabi-readelf --section-headers build/zephyr/zephyr.elf | \
  grep -E '(Section Headers:)|(  \[Nr\])|(zephyr_dbg_info)'
Section Headers:
  [Nr] Name            Type     Addr     Off    Size   ES Flg Lk Inf Al
  [10] zephyr_dbg_info PROGBITS 60012298 01238c 000040 00  WA  0   0  4
```

Set them as const to set the output section to read-only:

```bash
❯ arm-zephyr-eabi-readelf --section-headers build/zephyr/zephyr.elf | \
  grep -E '(Section Headers:)|(  \[Nr\])|(zephyr_dbg_info)'
Section Headers:
  [Nr] Name            Type     Addr     Off    Size   ES Flg Lk Inf Al
  [10] zephyr_dbg_info PROGBITS 60012298 01238c 000040 00   A  0   0  4
```

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2023-09-11 19:56:18 +02:00
..
coredump
gdbstub
CMakeLists.txt
Kconfig
asan_hacks.c
gdbstub.c debug: gdbstub: s/device.h/init.h 2023-08-30 11:52:49 +02:00
gdbstub_backend.h
thread_analyzer.c
thread_info.c debug: Set thread_info.c variables to const 2023-09-11 19:56:18 +02:00