New ARI warning Fri Aug 17 18:59:42 UTC 2012
GDB Administrator
gdbadmin@sourceware.org
Fri Aug 17 19:00:00 GMT 2012
60a61
> gdb/auto-load.c:1024: regression: var_boolean: Replace var_boolean with add_setshow_boolean_cmd
gdb/auto-load.c:1024: if (list->var_type == var_boolean)
62a64,65
> gdb/breakpoint.c:1025: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/breakpoint.c:1025: sprintf (location, ', b->number);
> gdb/breakpoint.c:1027: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/breakpoint.c:1027: sprintf (location, ', b->number, count);
90d92
< gdb/cli/cli-decode.h:277: deprecated: deprecated cmd_warning: Do not use deprecated cmd_warning, see declaration for details
gdb/cli/cli-decode.h:277: deprecated_cmd_warning (char **);
115c117,122
< gdb/common/buffer.c:51: regression: abort: Do not use abort, instead use internal_error; GDB should never abort
gdb/common/buffer.c:51: abort ();
> gdb/common/agent.c:174: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/agent.c:174: warning (_('), strerror (errno));
> gdb/common/agent.c:193: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/agent.c:193: path, strerror (errno));
> gdb/common/buffer.c:112: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:112: sprintf (str, ', va_arg (ap, int));
> gdb/common/buffer.c:115: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:115: sprintf (str, ', va_arg (ap, unsigned int));
> gdb/common/buffer.c:118: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:118: sprintf (str, ', va_arg (ap, unsigned int));
> gdb/common/buffer.c:121: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:121: sprintf (str, ', va_arg (ap, unsigned int));
119a127,134
> gdb/common/buffer.c:144: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:144: sprintf (str, ' PRId64,
> gdb/common/buffer.c:145: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/buffer.c:145: (int64_t) va_arg (ap, long long));
> gdb/common/buffer.c:148: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:148: sprintf (str, ' PRIu64,
> gdb/common/buffer.c:149: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/buffer.c:149: (uint64_t) va_arg (ap, unsigned long long));
> gdb/common/buffer.c:152: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:152: sprintf (str, ' PRIx64,
> gdb/common/buffer.c:153: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/buffer.c:153: (uint64_t) va_arg (ap, unsigned long long));
> gdb/common/buffer.c:156: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/buffer.c:156: sprintf (str, ' PRIo64,
> gdb/common/buffer.c:157: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/buffer.c:157: (uint64_t) va_arg (ap, unsigned long long));
128a144,151
> gdb/common/linux-osdata.c:52: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/linux-osdata.c:52:typedef long long PID_T;
> gdb/common/linux-osdata.c:57: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/linux-osdata.c:57:typedef long long TIME_T;
> gdb/common/linux-osdata.c:77: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:77: sprintf (filename, "/proc/%lld/task/%lld/stat",
gdb/common/linux-osdata.c:77: sprintf (filename, ',
> gdb/common/linux-osdata.c:77: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/common/linux-osdata.c:77: sprintf (filename, "/proc/%lld/task/%lld/stat",
gdb/common/linux-osdata.c:77: sprintf (filename, ',
> gdb/common/linux-osdata.c:127: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:127: char *stat_path = xstrprintf ("/proc/%lld/stat", pid);
> gdb/common/linux-osdata.c:152: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:152: snprintf (command, maxlen, "%lld", pid);
> gdb/common/linux-osdata.c:166: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:166: char *pathname = xstrprintf ("/proc/%lld/cmdline", pid);
> gdb/common/linux-osdata.c:246: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:246: sprintf (procentry, "/proc/%lld", pid);
gdb/common/linux-osdata.c:246: sprintf (procentry, ', pid);
129a153
> gdb/common/linux-osdata.c:291: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:291: sprintf (taskdir, "/proc/%lld/task", pid);
gdb/common/linux-osdata.c:291: sprintf (taskdir, ', pid);
131a156,158
> gdb/common/linux-osdata.c:393: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:393: "<column name=\"pid\">%lld</column>"
> gdb/common/linux-osdata.c:545: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:545: "<column name=\"pgid\">%lld</column>"
> gdb/common/linux-osdata.c:547: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:547: "<column name=\"pid\">%lld</column>"
132a160,161
> gdb/common/linux-osdata.c:654: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:654: "<column name=\"pid\">%lld</column>"
> gdb/common/linux-osdata.c:656: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:656: "<column name=\"tid\">%lld</column>"
133a163,168
> gdb/common/linux-osdata.c:1132: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:1132: "%d %d %o %d %lld %lld %d %u %u %u %u %lld %lld %lld",
> gdb/common/linux-osdata.c:1259: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:1259: "%d %d %o %u %d %d %d %d %lld %lld",
> gdb/common/linux-osdata.c:1372: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:1372: "%d %d %o %u %u %lld %lld %d %d %d %d %lld %lld %lld",
> gdb/common/linux-osdata.c:1490: code: long long: Do not use 'long long', instead use LONGEST
gdb/common/linux-osdata.c:1490: unsigned long long address;
> gdb/common/linux-osdata.c:1495: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:1495: "%64s %d %d %256s %16s 0x%llx",
> gdb/common/linux-osdata.c:1508: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/common/linux-osdata.c:1508: "<column name=\"address\">%llx</column>"
136a172,185
> gdb/common/linux-ptrace.c:1: comment: GNU/Linux: Do not use 'Linux', instead use 'Linux kernel' or 'GNU/Linux system'; comments should clearly differentiate between the two (this test assumes that word 'Linux' appears on the same line as the word 'GNU' or 'kernel' or a kernel version
gdb/common/linux-ptrace.c:1:/* Linux-specific ptrace manipulation routines.
> gdb/common/linux-ptrace.c:60: regression: wait.h: Do not include wait.h or sys/wait.h, instead include gdb_wait.h
gdb/common/linux-ptrace.c:60:#include <sys/wait.h>
> gdb/common/linux-ptrace.c:82: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/linux-ptrace.c:82: strerror (errno));
> gdb/common/linux-ptrace.c:94: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/linux-ptrace.c:94: strerror (errno));
> gdb/common/linux-ptrace.c:101: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/linux-ptrace.c:101: strerror (errno));
> gdb/common/linux-ptrace.c:129: regression: strerror: Do not use strerror(), instead use safe_strerror()
gdb/common/linux-ptrace.c:129: strerror (errno));
> gdb/common/vec.c:39: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.c:39:static inline unsigned
> gdb/common/vec.h:419: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:419:#define DEF_VEC_I(T) static inline void VEC_OP (T,must_be_integral_type) (void) { (void)~(T)0; } VEC_T(T); DEF_VEC_FUNC_P(T) DEF_VEC_ALLOC_FUNC_I(T) struct vec_swallow_trailing_semi
> gdb/common/vec.h:431: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:431:#define DEF_VEC_P(T) static inline void VEC_OP (T,must_be_pointer_type) (void) { (void)((T)1 == (void *)1); } VEC_T(T); DEF_VEC_FUNC_P(T) DEF_VEC_ALLOC_FUNC_P(T) struct vec_swallow_trailing_semi
> gdb/common/vec.h:520: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:520:#define DEF_VEC_ALLOC_FUNC_I(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_o_reserve (NULL, -alloc_, offsetof (VEC(T),vec), sizeof (T)); } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *) vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, const T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, const T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
> gdb/common/vec.h:703: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:703:#define DEF_VEC_FUNC_P(T) static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) { return vec_ ? vec_->num : 0; } static inline T VEC_OP (T,last) (const VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_ && vec_->num, '); return vec_->vec[vec_->num - 1]; } static inline T VEC_OP (T,index) (const VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (vec_ && ix_ < vec_->num, '); return vec_->vec[ix_]; } static inline int VEC_OP (T,iterate) (const VEC(T) *vec_, unsigned ix_, T *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static inline size_t VEC_OP (T,embedded_size) (int alloc_) { return offsetof (VEC(T),vec) + alloc_ * sizeof(T); } static inline void VEC_OP (T,embedded_init) (VEC(T) *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static inline int VEC_OP (T,space) (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) { vec_assert (alloc_ >= 0, '); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static inline T *VEC_OP (T,quick_push) (VEC(T) *vec_, T obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc, '); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static inline T VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) { T obj_; vec_assert (vec_->num, '); obj_ = vec_->vec[--vec_->num]; return obj_; } static inline void VEC_OP (T,truncate) (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) { vec_assert (vec_ ? vec_->num >= size_ : !size_, '); if (vec_) vec_->num = size_; } static inline T VEC_OP (T,replace) (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { T old_obj_; vec_assert (ix_ < vec_->num, '); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static inline T *VEC_OP (T,quick_insert) (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); *slot_ = obj_; return slot_; } static inline T VEC_OP (T,ordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; T obj_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); return obj_; } static inline T VEC_OP (T,unordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; T obj_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static inline void VEC_OP (T,block_remove) (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ + len_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); } static inline T *VEC_OP (T,address) (VEC(T) *vec_) { return vec_ ? vec_->vec : 0; } static inline unsigned VEC_OP (T,lower_bound) (VEC(T) *vec_, const T obj_, int (*lessthan_)(const T, const T) VEC_ASSERT_DECL) { unsigned int len_ = VEC_OP (T, length) (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { T middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; }
> gdb/common/vec.h:782: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:782:#define DEF_VEC_ALLOC_FUNC_P(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_p_reserve (NULL, -alloc_); } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *)(vec_p_reserve (NULL, -len_)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_p_reserve (*vec_, alloc_); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
> gdb/common/vec.h:952: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:952:#define DEF_VEC_FUNC_O(T) static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) { return vec_ ? vec_->num : 0; } static inline T *VEC_OP (T,last) (VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_ && vec_->num, '); return &vec_->vec[vec_->num - 1]; } static inline T *VEC_OP (T,index) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (vec_ && ix_ < vec_->num, '); return &vec_->vec[ix_]; } static inline int VEC_OP (T,iterate) (VEC(T) *vec_, unsigned ix_, T **ptr) { if (vec_ && ix_ < vec_->num) { *ptr = &vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static inline size_t VEC_OP (T,embedded_size) (int alloc_) { return offsetof (VEC(T),vec) + alloc_ * sizeof(T); } static inline void VEC_OP (T,embedded_init) (VEC(T) *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static inline int VEC_OP (T,space) (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) { vec_assert (alloc_ >= 0, '); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static inline T *VEC_OP (T,quick_push) (VEC(T) *vec_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc, '); slot_ = &vec_->vec[vec_->num++]; if (obj_) *slot_ = *obj_; return slot_; } static inline void VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_->num, '); --vec_->num; } static inline void VEC_OP (T,truncate) (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) { vec_assert (vec_ ? vec_->num >= size_ : !size_, '); if (vec_) vec_->num = size_; } static inline T *VEC_OP (T,replace) (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; if (obj_) *slot_ = *obj_; return slot_; } static inline T *VEC_OP (T,quick_insert) (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); if (obj_) *slot_ = *obj_; return slot_; } static inline void VEC_OP (T,ordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); } static inline void VEC_OP (T,unordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (ix_ < vec_->num, '); vec_->vec[ix_] = vec_->vec[--vec_->num]; } static inline void VEC_OP (T,block_remove) (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ + len_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); } static inline T *VEC_OP (T,address) (VEC(T) *vec_) { return vec_ ? vec_->vec : 0; } static inline unsigned VEC_OP (T,lower_bound) (VEC(T) *vec_, const T *obj_, int (*lessthan_)(const T *, const T *) VEC_ASSERT_DECL) { unsigned int len_ = VEC_OP (T, length) (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { T *middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; }
> gdb/common/vec.h:1034: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/common/vec.h:1034:#define DEF_VEC_ALLOC_FUNC_O(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_o_reserve (NULL, -alloc_, offsetof (VEC(T),vec), sizeof (T)); } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *) vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, const T *obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
218a268,270
> gdb/dwarf2expr.h:300: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/dwarf2expr.h:300:static inline const gdb_byte *
> gdb/dwarf2expr.h:311: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/dwarf2expr.h:311:static inline const gdb_byte *
> gdb/dwarf2expr.h:322: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/dwarf2expr.h:322:static inline const gdb_byte *
219a272
> gdb/dwarf2loc.c:3431: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/dwarf2loc.c:3431: else if (data + 3 <= end && data + 1 + (leb128_size = skip_leb128 (data + 1, end)) < end && data[0] == DW_OP_GNU_const_index && leb128_size > 0 && data[1 + leb128_size] == DW_OP_GNU_push_tls_address && piece_end_p (data + 2 + leb128_size, end))
340a394,395
> gdb/i386-nat.c:226: comment: GNU/Linux: Do not use 'Linux', instead use 'Linux kernel' or 'GNU/Linux system'; comments should clearly differentiate between the two (this test assumes that word 'Linux' appears on the same line as the word 'GNU' or 'kernel' or a kernel version
gdb/i386-nat.c:226: on fork/vfork/clone. Newer Linux kernels create such tasks with
> gdb/i386-nat.c:231: comment: GNU/Linux: Do not use 'Linux', instead use 'Linux kernel' or 'GNU/Linux system'; comments should clearly differentiate between the two (this test assumes that word 'Linux' appears on the same line as the word 'GNU' or 'kernel' or a kernel version
gdb/i386-nat.c:231: process to be compatible with the older Linux kernels.
345a401
> gdb/ia64-libunwind-tdep.c:146: deprecated: deprecated set_gdbarch_data: Do not use deprecated set_gdbarch_data, see declaration for details
gdb/ia64-libunwind-tdep.c:146: deprecated_set_gdbarch_data (gdbarch,
392,393d447
< gdb/infrun.c:3336: deprecate: SOLIB_ADD: Replace SOLIB_ADD with nothing, not needed?
gdb/infrun.c:3336:#ifdef SOLIB_ADD
< gdb/infrun.c:3337: deprecate: SOLIB_ADD: Replace SOLIB_ADD with nothing, not needed?
gdb/infrun.c:3337: SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add);
405d458
< gdb/infrun.c:6924: code: OP eol: Do not use &&, or || at the end of a line
gdb/infrun.c:6924: if (last.kind != TARGET_WAITKIND_SYSCALL_ENTRY &&
435,445d487
< gdb/language.c:607: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:607: return (TYPE_CODE (type) != TYPE_CODE_INT) &&
< gdb/language.c:648: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:648: return (TYPE_CODE (type) == TYPE_CODE_INT) &&
< gdb/language.c:715: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:715: return TYPE_CODE (type) == TYPE_CODE_PTR ||
< gdb/language.c:731: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:731: return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
< gdb/language.c:732: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:732: (TYPE_CODE (type) == TYPE_CODE_UNION) ||
< gdb/language.c:735: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:735: return (TYPE_CODE(type) == TYPE_CODE_STRUCT) ||
< gdb/language.c:736: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:736: (TYPE_CODE(type) == TYPE_CODE_UNION) ||
< gdb/language.c:737: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:737: (TYPE_CODE(type) == TYPE_CODE_SET) ||
< gdb/language.c:740: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:740: return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
< gdb/language.c:741: code: OP eol: Do not use &&, or || at the end of a line
gdb/language.c:741: (TYPE_CODE (type) == TYPE_CODE_SET) ||
< gdb/libunwind-frame.c:134: deprecated: deprecated set_gdbarch_data: Do not use deprecated set_gdbarch_data, see declaration for details
gdb/libunwind-frame.c:134: deprecated_set_gdbarch_data (gdbarch,
456,462d497
< gdb/linux-nat.c:4351: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4351: long long *addr,
< gdb/linux-nat.c:4352: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4352: long long *endaddr,
< gdb/linux-nat.c:4354: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4354: long long *offset,
< gdb/linux-nat.c:4355: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4355: char *device, long long *inode, char *filename)
< gdb/linux-nat.c:4385: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4385: long long addr, endaddr, size, offset, inode;
< gdb/linux-nat.c:4391: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4391: sprintf (mapsfilename, ', pid);
< gdb/linux-nat.c:4392: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/linux-nat.c:4392: if ((mapsfile = fopen (mapsfilename, ')) == NULL)
467,478d501
< gdb/linux-nat.c:4816: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/linux-nat.c:4816: if ((procfile = fopen (fname1, ')) != NULL)
< gdb/linux-nat.c:4831: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4831: sprintf (fname1, ', pid);
< gdb/linux-nat.c:4840: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4840: sprintf (fname1, ', pid);
< gdb/linux-nat.c:4849: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4849: sprintf (fname1, ', pid);
< gdb/linux-nat.c:4850: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/linux-nat.c:4850: if ((procfile = fopen (fname1, ')) != NULL)
< gdb/linux-nat.c:4852: code: long long: Do not use 'long long', instead use LONGEST
gdb/linux-nat.c:4852: long long addr, endaddr, size, offset, inode;
< gdb/linux-nat.c:4911: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4911: sprintf (fname1, ', pid);
< gdb/linux-nat.c:4912: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/linux-nat.c:4912: if ((procfile = fopen (fname1, ')) != NULL)
< gdb/linux-nat.c:4925: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:4925: sprintf (fname1, ', pid);
< gdb/linux-nat.c:4926: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/linux-nat.c:4926: if ((procfile = fopen (fname1, ')) != NULL)
< gdb/linux-nat.c:5111: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:5111: sprintf (filename, ', PIDGET (inferior_ptid));
< gdb/linux-nat.c:5281: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/linux-nat.c:5281: sprintf (fname, ', pid);
538a562
> gdb/mips-tdep.c:538: comment: GNU/Linux: Do not use 'Linux', instead use 'Linux kernel' or 'GNU/Linux system'; comments should clearly differentiate between the two (this test assumes that word 'Linux' appears on the same line as the word 'GNU' or 'kernel' or a kernel version
gdb/mips-tdep.c:538:/* Names of registers with Linux kernels. */
544,545d567
< gdb/mips-tdep.c:4750: code: OP eol: Do not use &&, or || at the end of a line
gdb/mips-tdep.c:4750: if (TYPE_CODE (register_type (gdbarch, regnum)) ==
< gdb/mips-tdep.c:4790: code: OP eol: Do not use &&, or || at the end of a line
gdb/mips-tdep.c:4790: if (TYPE_CODE (register_type (gdbarch, regnum)) ==
547d568
< gdb/mips-tdep.c:4846: code: OP eol: Do not use &&, or || at the end of a line
gdb/mips-tdep.c:4846: if (TYPE_CODE (register_type (gdbarch, regnum)) ==
549d569
< gdb/mips-tdep.c:5360: code: OP eol: Do not use &&, or || at the end of a line
gdb/mips-tdep.c:5360: if (find_pc_partial_function (target_pc, &name, NULL, NULL) ==
629a650
> gdb/ppc-linux-tdep.c:797: comment: GNU/Linux: Do not use 'Linux', instead use 'Linux kernel' or 'GNU/Linux system'; comments should clearly differentiate between the two (this test assumes that word 'Linux' appears on the same line as the word 'GNU' or 'kernel' or a kernel version
gdb/ppc-linux-tdep.c:797:/* Wrappers to handle Linux-only registers. */
705d725
< gdb/python/py-finishbreakpoint.c:280: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/python/py-finishbreakpoint.c:280: sprintf (small_buf, ', hex_string (finish_pc));
722d741
< gdb/remote.c:482: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:482: sprintf (buf, ', adjusted_size);
729,730d747
< gdb/remote.c:1422: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:1422: sprintf (rs->buf, ', pid);
< gdb/remote.c:1424: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:1424: sprintf (rs->buf, ');
732,735d748
< gdb/remote.c:2823: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:2823: sprintf (p, ');
< gdb/remote.c:3571: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:3571: sprintf (rs->buf, '
< gdb/remote.c:4190: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:4190: sprintf (rs->buf, ', pid);
< gdb/remote.c:4269: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:4269: sprintf (rs->buf, ', pid);
738d750
< gdb/remote.c:5751: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:5751: sprintf (rs->buf, ');
743,744d754
< gdb/remote.c:7723: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7723: sprintf (p, ', bpsize);
< gdb/remote.c:7761: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7761: sprintf (p, ', bp_tgt->placed_size);
746,751d755
< gdb/remote.c:7803: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7803: sprintf (rs->buf, ', packet);
< gdb/remote.c:7807: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7807: sprintf (p, ', len);
< gdb/remote.c:7837: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7837: sprintf (rs->buf, ', packet);
< gdb/remote.c:7841: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7841: sprintf (p, ', len);
< gdb/remote.c:7948: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7948: sprintf (p, ', bp_tgt->placed_size);
< gdb/remote.c:7983: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:7983: sprintf (p, ', bp_tgt->placed_size);
753,760d756
< gdb/remote.c:9917: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:9917: sprintf (buf, ', b->number,
< gdb/remote.c:9934: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:9934: sprintf (buf + strlen (buf), ', isize);
< gdb/remote.c:9978: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:9978: sprintf (buf + strlen (buf), ', aexpr->len);
< gdb/remote.c:10003: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10003: sprintf (buf, ',
< gdb/remote.c:10020: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10020: sprintf (buf, ',
< gdb/remote.c:10100: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10100: sprintf (rs->buf, ',
< gdb/remote.c:10122: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10122: sprintf (rs->buf, ', location->owner->number, addr_buf);
< gdb/remote.c:10138: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10138: sprintf (rs->buf, ', location->owner->number, addr_buf);
762,773d757
< gdb/remote.c:10184: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10184: sprintf (target_buf + offset, ', tmp1, tmp2);
< gdb/remote.c:10268: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10268: sprintf (rs->buf, ', tp->number_on_target,
< gdb/remote.c:10283: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10283: sprintf (rs->buf, ', utp->number, phex_nz (utp->addr, 0));
< gdb/remote.c:10326: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10326: sprintf (p, ', num);
< gdb/remote.c:10329: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10329: sprintf (p, ', phex_nz (addr1, 0));
< gdb/remote.c:10332: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10332: sprintf (p, ', num);
< gdb/remote.c:10335: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10335: sprintf (p, ', phex_nz (addr1, 0), phex_nz (addr2, 0));
< gdb/remote.c:10338: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10338: sprintf (p, ', phex_nz (addr1, 0), phex_nz (addr2, 0));
< gdb/remote.c:10393: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10393: sprintf (rs->buf, ', tsvnum);
< gdb/remote.c:10482: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10482: sprintf (rs->buf, ', val);
< gdb/remote.c:10510: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10510: sprintf (rs->buf, ', val);
< gdb/remote.c:10550: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf
gdb/remote.c:10550: sprintf (rs->buf, ');
933,941d916
< gdb/symtab.c:3327: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3327: MSYMBOL_TYPE (msymbol) == ourtype3 ||
< gdb/symtab.c:3431: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3431: if (MSYMBOL_TYPE (msymbol) == ourtype ||
< gdb/symtab.c:3432: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3432: MSYMBOL_TYPE (msymbol) == ourtype2 ||
< gdb/symtab.c:3433: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3433: MSYMBOL_TYPE (msymbol) == ourtype3 ||
< gdb/symtab.c:3441: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3441: if (kind != FUNCTIONS_DOMAIN ||
< gdb/symtab.c:3501: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3501: else if (kind < TYPES_DOMAIN ||
< gdb/symtab.c:3502: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3502: (kind == TYPES_DOMAIN &&
< gdb/symtab.c:3913: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3913: if (isalnum (t[-1]) || t[-1] == '.' ||
< gdb/symtab.c:3914: code: OP eol: Do not use &&, or || at the end of a line
gdb/symtab.c:3914: t[-1] == '.' || t[-1] == '.' ||
974a950
> gdb/top.c:376: deprecated: deprecated safe_get_selected_frame: Do not use deprecated safe_get_selected_frame, see declaration for details
gdb/top.c:376: deprecated_safe_get_selected_frame ();
979d954
< gdb/top.c:462: deprecated: deprecated safe_get_selected_frame: Do not use deprecated safe_get_selected_frame, see declaration for details
gdb/top.c:462: deprecated_safe_get_selected_frame ();
997,998d971
< gdb/tracepoint.c:1801: gettext: _ markup: All messages should be marked up with _.
gdb/tracepoint.c:1801: warning ("Target does not support trace user/notes, info ignored");
< gdb/tracepoint.c:1861: gettext: _ markup: All messages should be marked up with _.
gdb/tracepoint.c:1861: warning ("Target does not support trace notes, note ignored");
1003,1005d975
< gdb/tracepoint.c:3169: gettext: _ markup: All messages should be marked up with _.
gdb/tracepoint.c:3169: warning ("Target does not support trace notes, user ignored");
< gdb/tracepoint.c:3181: gettext: _ markup: All messages should be marked up with _.
gdb/tracepoint.c:3181: warning ("Target does not support trace notes, note ignored");
< gdb/tracepoint.c:3193: gettext: _ markup: All messages should be marked up with _.
gdb/tracepoint.c:3193: warning ("Target does not support trace notes, stop note ignored");
1068d1037
< gdb/valops.c:2122: deprecated: deprecated set_value_type: Do not use deprecated set_value_type, see declaration for details
gdb/valops.c:2122: deprecated_set_value_type (v2, basetype);
1071d1039
< gdb/valops.c:2633: deprecated: deprecated set_value_type: Do not use deprecated set_value_type, see declaration for details
gdb/valops.c:2633: deprecated_set_value_type (args[0],
1083a1052
> gdb/value.c:3266: deprecated: deprecated set_value_type: Do not use deprecated set_value_type, see declaration for details
gdb/value.c:3266: deprecated_set_value_type (value, TYPE_TARGET_TYPE (original_type));
1097,1104d1065
< gdb/vec.c:34: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.c:34:static inline unsigned
< gdb/vec.h:416: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:416:#define DEF_VEC_I(T) static inline void VEC_OP (T,must_be_integral_type) (void) { (void)~(T)0; } VEC_T(T); DEF_VEC_FUNC_P(T) DEF_VEC_ALLOC_FUNC_I(T) struct vec_swallow_trailing_semi
< gdb/vec.h:428: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:428:#define DEF_VEC_P(T) static inline void VEC_OP (T,must_be_pointer_type) (void) { (void)((T)1 == (void *)1); } VEC_T(T); DEF_VEC_FUNC_P(T) DEF_VEC_ALLOC_FUNC_P(T) struct vec_swallow_trailing_semi
< gdb/vec.h:517: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:517:#define DEF_VEC_ALLOC_FUNC_I(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_o_reserve (NULL, -alloc_, offsetof (VEC(T),vec), sizeof (T)); } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *) vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, const T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, const T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
< gdb/vec.h:700: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:700:#define DEF_VEC_FUNC_P(T) static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) { return vec_ ? vec_->num : 0; } static inline T VEC_OP (T,last) (const VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_ && vec_->num, '); return vec_->vec[vec_->num - 1]; } static inline T VEC_OP (T,index) (const VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (vec_ && ix_ < vec_->num, '); return vec_->vec[ix_]; } static inline int VEC_OP (T,iterate) (const VEC(T) *vec_, unsigned ix_, T *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static inline size_t VEC_OP (T,embedded_size) (int alloc_) { return offsetof (VEC(T),vec) + alloc_ * sizeof(T); } static inline void VEC_OP (T,embedded_init) (VEC(T) *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static inline int VEC_OP (T,space) (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) { vec_assert (alloc_ >= 0, '); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static inline T *VEC_OP (T,quick_push) (VEC(T) *vec_, T obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc, '); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static inline T VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) { T obj_; vec_assert (vec_->num, '); obj_ = vec_->vec[--vec_->num]; return obj_; } static inline void VEC_OP (T,truncate) (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) { vec_assert (vec_ ? vec_->num >= size_ : !size_, '); if (vec_) vec_->num = size_; } static inline T VEC_OP (T,replace) (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { T old_obj_; vec_assert (ix_ < vec_->num, '); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static inline T *VEC_OP (T,quick_insert) (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); *slot_ = obj_; return slot_; } static inline T VEC_OP (T,ordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; T obj_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); return obj_; } static inline T VEC_OP (T,unordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; T obj_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static inline void VEC_OP (T,block_remove) (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ + len_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); } static inline T *VEC_OP (T,address) (VEC(T) *vec_) { return vec_ ? vec_->vec : 0; } static inline unsigned VEC_OP (T,lower_bound) (VEC(T) *vec_, const T obj_, int (*lessthan_)(const T, const T) VEC_ASSERT_DECL) { unsigned int len_ = VEC_OP (T, length) (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { T middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; }
< gdb/vec.h:779: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:779:#define DEF_VEC_ALLOC_FUNC_P(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_p_reserve (NULL, -alloc_); } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *)(vec_p_reserve (NULL, -len_)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_p_reserve (*vec_, alloc_); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
< gdb/vec.h:949: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:949:#define DEF_VEC_FUNC_O(T) static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) { return vec_ ? vec_->num : 0; } static inline T *VEC_OP (T,last) (VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_ && vec_->num, '); return &vec_->vec[vec_->num - 1]; } static inline T *VEC_OP (T,index) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (vec_ && ix_ < vec_->num, '); return &vec_->vec[ix_]; } static inline int VEC_OP (T,iterate) (VEC(T) *vec_, unsigned ix_, T **ptr) { if (vec_ && ix_ < vec_->num) { *ptr = &vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static inline size_t VEC_OP (T,embedded_size) (int alloc_) { return offsetof (VEC(T),vec) + alloc_ * sizeof(T); } static inline void VEC_OP (T,embedded_init) (VEC(T) *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static inline int VEC_OP (T,space) (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) { vec_assert (alloc_ >= 0, '); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static inline T *VEC_OP (T,quick_push) (VEC(T) *vec_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc, '); slot_ = &vec_->vec[vec_->num++]; if (obj_) *slot_ = *obj_; return slot_; } static inline void VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) { vec_assert (vec_->num, '); --vec_->num; } static inline void VEC_OP (T,truncate) (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) { vec_assert (vec_ ? vec_->num >= size_ : !size_, '); if (vec_) vec_->num = size_; } static inline T *VEC_OP (T,replace) (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; if (obj_) *slot_ = *obj_; return slot_; } static inline T *VEC_OP (T,quick_insert) (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { T *slot_; vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); if (obj_) *slot_ = *obj_; return slot_; } static inline void VEC_OP (T,ordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ < vec_->num, '); slot_ = &vec_->vec[ix_]; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); } static inline void VEC_OP (T,unordered_remove) (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) { vec_assert (ix_ < vec_->num, '); vec_->vec[ix_] = vec_->vec[--vec_->num]; } static inline void VEC_OP (T,block_remove) (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) { T *slot_; vec_assert (ix_ + len_ <= vec_->num, '); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); } static inline T *VEC_OP (T,address) (VEC(T) *vec_) { return vec_ ? vec_->vec : 0; } static inline unsigned VEC_OP (T,lower_bound) (VEC(T) *vec_, const T *obj_, int (*lessthan_)(const T *, const T *) VEC_ASSERT_DECL) { unsigned int len_ = VEC_OP (T, length) (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { T *middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; }
< gdb/vec.h:1031: code: inline: Do not use the inline attribute; since the compiler generally ignores this, better algorithm selection is needed to improved performance
gdb/vec.h:1031:#define DEF_VEC_ALLOC_FUNC_O(T) static inline VEC(T) *VEC_OP (T,alloc) (int alloc_) { return (VEC(T) *) vec_o_reserve (NULL, -alloc_, offsetof (VEC(T),vec), sizeof (T)); } static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) { size_t len_ = vec_ ? vec_->num : 0; VEC (T) *new_vec_ = NULL; if (len_) { new_vec_ = (VEC (T) *) vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); new_vec_->num = len_; memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); } return new_vec_; } static inline void VEC_OP (T,free) (VEC(T) **vec_) { if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline void VEC_OP (T,cleanup) (void *arg_) { VEC(T) **vec_ = arg_; if (*vec_) vec_free_ (*vec_); *vec_ = NULL; } static inline int VEC_OP (T,reserve) (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) { int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); if (extend) *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); return extend; } static inline void VEC_OP (T,safe_grow) (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) { vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, '); VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); (*vec_)->num = size_; } static inline T *VEC_OP (T,safe_push) (VEC(T) **vec_, const T *obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); } static inline T *VEC_OP (T,safe_insert) (VEC(T) **vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) { VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); }
More information about the Gdb-patches
mailing list