diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-03-25 22:37:33 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-03-25 22:37:33 +0000 |
commit | 04cdafa7a4314c38f12db19d403296eda723075e (patch) | |
tree | 1ece4b5a0c71c7622bb140e479e7c38d913371ed /sim | |
parent | 8b901ef830fed4fd438e0ff46e6d2a3b4ee982d2 (diff) | |
download | gdb-04cdafa7a4314c38f12db19d403296eda723075e.zip gdb-04cdafa7a4314c38f12db19d403296eda723075e.tar.gz gdb-04cdafa7a4314c38f12db19d403296eda723075e.tar.bz2 |
* hw-tree.c (hw_tree_find_property): Return NULL when device is not found.
(hw_tree_find_*_property): Clean up error message when property is not found.
* dv-pal.c (hw_pal_io_read_buffer): Check the smp property is present before
looking for it.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 10 | ||||
-rw-r--r-- | sim/common/dv-pal.c | 12 |
2 files changed, 20 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 9d0537f..833f51d 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,13 @@ +Thu Mar 26 09:10:56 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * hw-tree.c (hw_tree_find_property): Return NULL when device is + not found. + (hw_tree_find_*_property): Clean up error message when property is + not found. + + * dv-pal.c (hw_pal_io_read_buffer): Check the smp property is + present before looking for it. + Wed Mar 25 16:17:38 1998 Ian Carmichael <iancarm@cygnus.com> * aclocal.m4 (AC_CHECK_HEADERS): Add check for fpu_control.h. diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c index 95554aab..4f19ff3 100644 --- a/sim/common/dv-pal.c +++ b/sim/common/dv-pal.c @@ -357,8 +357,16 @@ hw_pal_io_read_buffer (struct hw *me, break; case hw_pal_nr_cpu_register: - *byte = hw_tree_find_integer_property (me, "/openprom/options/smp"); - HW_TRACE ((me, "read - nr-cpu %d\n", *byte)); + if (hw_tree_find_property (me, "/openprom/options/smp") == NULL) + { + *byte = 1; + HW_TRACE ((me, "read - nr-cpu %d (not defined)\n", *byte)); + } + else + { + *byte = hw_tree_find_integer_property (me, "/openprom/options/smp"); + HW_TRACE ((me, "read - nr-cpu %d\n", *byte)); + } break; case hw_pal_read_fifo: |