]> git.proxmox.com Git - mirror_qemu.git/commit - hw/arm/realview.c
qom: simplify object_find_property / object_class_find_property
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 14 Sep 2020 13:56:17 +0000 (14:56 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 22 Sep 2020 20:45:16 +0000 (16:45 -0400)
commitefba15959cdb1ca7beeed8d6188ab0905b468f90
tree5af4ba146184a2bcdc3100bd37388a04b11d3e43
parent834b9273d5cdab68180dc8c84d641aaa4344b057
qom: simplify object_find_property / object_class_find_property

When debugging QEMU it is often useful to put a breakpoint on the
error_setg_internal method impl.

Unfortunately the object_property_add / object_class_property_add
methods call object_property_find / object_class_property_find methods
to check if a property exists already before adding the new property.

As a result there are a huge number of calls to error_setg_internal
on startup of most QEMU commands, making it very painful to set a
breakpoint on this method.

Most callers of object_find_property and object_class_find_property,
however, pass in a NULL for the Error parameter. This simplifies the
methods to remove the Error parameter entirely, and then adds some
new wrapper methods that are able to raise an Error when needed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200914135617.1493072-1-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
22 files changed:
hw/arm/armv7m.c
hw/arm/exynos4210.c
hw/arm/highbank.c
hw/arm/integratorcp.c
hw/arm/realview.c
hw/arm/sbsa-ref.c
hw/arm/versatilepb.c
hw/arm/vexpress.c
hw/arm/virt.c
hw/arm/xilinx_zynq.c
hw/core/qdev-properties-system.c
hw/core/sysbus.c
hw/cpu/a15mpcore.c
hw/cpu/a9mpcore.c
hw/misc/iotkit-sysctl.c
hw/pci/pci.c
hw/scsi/scsi-bus.c
include/qom/object.h
qom/object.c
target/arm/monitor.c
target/i386/cpu.c
target/ppc/translate_init.c.inc