Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semihosting & gdb #4

Open
ilg-ul opened this issue Oct 27, 2014 · 1 comment
Open

semihosting & gdb #4

ilg-ul opened this issue Oct 27, 2014 · 1 comment

Comments

@ilg-ul
Copy link

ilg-ul commented Oct 27, 2014

Hi Andre,

I did some tests with your STM32 version of QEMU and I'm impressed by the improvements, even SysTick seems functional :-)

However I have a problem, when GDB is connected to QEMU, the semihosting output is temporarily lost; after I disconnect GDB, the semihosting output resumes.

I know that this is not related to your added features, but in case you figure out how to fix it, I'd be happy to test it.

Regards,

Liviu

@beckus
Copy link
Owner

beckus commented Nov 12, 2014

I am glad you like this project.  Yes, the SysTick works, although I cannot take credit for that part - it was already part of the core NVIC functionality in QEMU (although I did tweak it).
Thanks for letting me know about this.  When I have a chance, I will try and take a look.  I have never used semihosting, so would be interested in trying it out.  Do you have a guide or tutorial that you could recommend?  Unfortunately I am not familiar with the GDB or semihosting code, but I imagine it is complex.

beckus pushed a commit that referenced this issue Nov 26, 2014
If the pci bridge enters in error flow as part
of init process it will only delete the shpc mmio
subregion but not remove it from the properties list,
resulting in segmentation fault when the bridge runs
the exit function.

Example: add a pci bridge without specifing the chassis number:
    <qemu-bin> ... -device pci-bridge,id=p1
Result:
    (qemu) qemu-system-x86_64: -device pci-bridge,id=p1: Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
    qemu-system-x86_64: -device pci-bridge,id=p1: Device
    initialization failed.
    Segmentation fault (core dumped)

    if (child->class->unparent) {
    #0  0x00005555558d629b in object_finalize_child_property (obj=0x555556d2e830, name=0x555556d30630 "shpc-mmio[0]", opaque=0x555556a42fc8) at qom/object.c:1078
    #1  0x00005555558d4b1f in object_property_del_all (obj=0x555556d2e830) at qom/object.c:367
    #2  0x00005555558d4ca1 in object_finalize (data=0x555556d2e830) at qom/object.c:412
    #3  0x00005555558d55a1 in object_unref (obj=0x555556d2e830) at qom/object.c:720
    #4  0x000055555572c907 in qdev_device_add (opts=0x5555563544f0) at qdev-monitor.c:566
    #5  0x0000555555744f16 in device_init_func (opts=0x5555563544f0, opaque=0x0) at vl.c:2213
    #6  0x00005555559cf5f0 in qemu_opts_foreach (list=0x555555e0f8e0 <qemu_device_opts>, func=0x555555744efa <device_init_func>, opaque=0x0, abort_on_failure=1) at util/qemu-option.c:1057
    #7  0x000055555574a11b in main (argc=16, argv=0x7fffffffdde8, envp=0x7fffffffde70) at vl.c:423

Unparent the shpc mmio region as part of shpc cleanup.

Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Amos Kong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants