Lines Matching +full:code +full:- +full:0
51 * If there are spare UART devices on the board, set ``zephyr,gdbstub-uart``
75 .. code-block:: bash
81 .. code-block:: bash
97 .. code-block:: console
99 ./scripts/twister -p qemu_x86 -T tests/subsys/debug/gdbstub
101 The test should run successfully, and now let's do something similar step-by-step
112 .. zephyr-app-commands::
113 :zephyr-app: tests/subsys/debug/gdbstub
114 :host-os: unix
116 :gen-args: '-DCONFIG_QEMU_EXTRA_FLAGS="-serial tcp:localhost:5678,server"'
125 .. code-block:: bash
127 <SDK install directory>/x86_64-zephyr-elf/bin/x86_64-zephyr-elf-gdb
131 .. code-block:: text
133 (gdb) symbol-file <build directory>/zephyr/zephyr.elf
137 .. code-block:: text
142 earlier as a server through the TCP port ``-serial`` redirection at QEMU.
144 .. code-block:: text
150 .. code-block:: text
156 GDB also shows where the code execution is stopped. In this case,
161 .. code-block:: text
164 #0 arch_gdb_init () at <ZEPHYR_BASE>/arch/x86/core/ia32/gdbstub.c:252
165 #1 0x00104140 in gdb_init () at <ZEPHYR_BASE>/zephyr/subsys/debug/gdbstub.c:852
166 …#2 0x00109c13 in z_sys_init_run_level (level=INIT_LEVEL_PRE_KERNEL_2) at <ZEPHYR_BASE>/kernel/ini…
167 #3 0x00109e73 in z_cstart () at <ZEPHYR_BASE>/kernel/init.c:630
168 …#4 0x00104422 in z_prep_c (arg=0x1245bc <x86_cpu_boot_arg>) at <ZEPHYR_BASE>/arch/x86/core/prep_c…
169 #5 0x001000c9 in __csSet () at <ZEPHYR_BASE>/arch/x86/core/ia32/crt0.S:290
170 #6 0x001245bc in uart_dev ()
171 #7 0x00134988 in z_interrupt_stacks ()
172 #8 0x00000000 in ?? ()
174 #. Use command ``list`` to show the source code and surroundings where
175 code execution is stopped.
177 .. code-block:: text
195 .. code-block:: text
199 857 return 0;
201 .. code-block:: text
209 857 return 0;
216 set up a breakpoint at :c:func:`main`, and let code execution continue
219 .. code-block:: text
222 … Breakpoint 1 at 0x10064d: file <ZEPHYR_BASE>/tests/subsys/debug/gdbstub/src/main.c, line 27.
224 .. code-block:: text
229 Once code execution reaches :c:func:`main`, execution will be stopped
232 .. code-block:: text
239 .. code-block:: text
250 30 return 0;
256 .. code-block:: text
265 To examine code execution inside :c:func:`test`,
272 .. code-block:: text
275 Run till exit from #0 test () at <ZEPHYR_BASE>/tests/subsys/debug/gdbstub/src/main.c:17
276 0x00100667 in main () at <ZEPHYR_BASE>/tests/subsys/debug/gdbstub/src/main.c:28
283 code is done after returning from function. The assignment code is
287 .. code-block:: text
296 #. If ``continue`` is issued here, code execution will continue indefinitely
298 in GDB via :kbd:`Ctrl-C` does not currently work as the Zephyr gdbstub does