X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fstap-probe.c;h=39da2900e7af30d0c24702019c8b835038b0b646;hb=4c6ee6465acc58f0f86c44668c4e862901186239;hp=ea206cbb80f3016db7e30e65db751892b7cd7415;hpb=0dc327459b19e6765c8fe80957f5c8620611628e;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index ea206cbb80..39da2900e7 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -1,6 +1,6 @@ /* SystemTap probe support for GDB. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -101,6 +101,12 @@ struct stap_probe_arg class stap_static_probe_ops : public static_probe_ops { public: + /* We need a user-provided constructor to placate some compilers. + See PR build/24937. */ + stap_static_probe_ops () + { + } + /* See probe.h. */ bool is_linespec (const char **linespecp) const override; @@ -1435,8 +1441,8 @@ stap_modify_semaphore (CORE_ADDR address, int set, struct gdbarch *gdbarch) return; } - value = extract_unsigned_integer (bytes, TYPE_LENGTH (type), - gdbarch_byte_order (gdbarch)); + enum bfd_endian byte_order = type_byte_order (type); + value = extract_unsigned_integer (bytes, TYPE_LENGTH (type), byte_order); /* Note that we explicitly don't worry about overflow or underflow. */ if (set) @@ -1444,8 +1450,7 @@ stap_modify_semaphore (CORE_ADDR address, int set, struct gdbarch *gdbarch) else --value; - store_unsigned_integer (bytes, TYPE_LENGTH (type), - gdbarch_byte_order (gdbarch), value); + store_unsigned_integer (bytes, TYPE_LENGTH (type), byte_order, value); if (target_write_memory (address, bytes, TYPE_LENGTH (type)) != 0) warning (_("Could not write the value of a SystemTap semaphore."));