summary refs log tree commit diff stats
path: root/results/classifier/118/kernel/1921092
blob: 0eeb78776cf544d57572a824eba41640e59caeac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
kernel: 0.900
device: 0.858
debug: 0.844
files: 0.812
boot: 0.760
semantic: 0.745
ppc: 0.723
user-level: 0.692
arm: 0.689
PID: 0.619
virtual: 0.585
register: 0.551
socket: 0.536
graphic: 0.536
mistranslation: 0.526
architecture: 0.526
performance: 0.525
hypervisor: 0.498
permissions: 0.489
network: 0.410
vnc: 0.388
peripherals: 0.345
risc-v: 0.342
x86: 0.297
VMM: 0.282
TCG: 0.217
assembly: 0.199
i386: 0.191
KVM: 0.165

gdbstub debug of multi-cluster machines is undocumented and confusing

Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
Trying to debug with options -s -S the second core fails to boot.
Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635

there was no bug, it was my fault. How do I delete this

In general, you don't need to delete bugs that turn out to be user error, or edit the description/title; just mark them as 'invalid', perhaps with a comment about what turned out to be the cause. That leaves the trail of what was going on for future readers who might be going down the same path as you.

There are actually a couple of things we should do here in upstream QEMU:

* we should document the process for using the debugstub with multi-cluster board models like the mps2-an521
* we should check whether we are doing the right/most appropriate thing when the user connects to the debug stub and is only attaching to one 'inferior' -- it sounds from your report like the un-attached inferior is left permanently in the 'stopped' state. Maybe that's what the gdb protocol requires, but it seems a bit unhelpful.

I'm going to update the bug status/text accordingly.


Thanks for the answer,

indeed the second cluster of the board has been halted when I was starting gdb the "normal" way - not adding the second inferior. In my own research I did not find out about these inferiors, so I was wondering why "info threads" did only show one cpu. Maybe gdb could inform the user about unattached inferiors when using "info threads"

Could you provide an example QEMU command line and guest image file which you were having this problem with, please? That would save me figuring out how to build zephyr binaries :-)


qemu-system-arm -cpu cortex-m33 -machine mps2-an521 -nographic -m 16 -vga none -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=7,align=off,sleep=off -rtc clock=vm -device loader,file=<remote_dir>/zephyr.elf -s -S -kernel <master_dir>/zephyr.elf

i've included both .elf files in a zip. That should be enough for running the sample

There's now a new docs section on debugging multicore (including multi-cluster) machines:

https://qemu-project.gitlab.io/qemu/system/gdb.html#debugging-multicore-machines


Is there still anything to do here or could we close the ticket now?

It can be closed. The added documentation is very helpful.

Ok, thanks, so I'm closing this ticket now.