}
global_opt<unsigned_option>
- dup_threshold_opt ("Threshold for duplicate messages.",
+ dup_threshold_opt ("Threshold for duplicate messages."
+ " Defaults to 16."
+ " Use zero for no limit.",
"count", "dups");
namespace
unsigned
dup_threshold ()
{
- static unsigned t = dup_threshold_opt.value ();
+ static unsigned t = dup_threshold_opt.value (16);
if (t == 0)
t = -1;
return t;
else if (int status = _m_filter->should_emit (key))
{
if (status == -1)
- get_stream () << "(threshold reached for the following message)"
+ get_stream () << "(threshold [--dups=" << dup_threshold ()
+ << "] reached for the following message)"
<< std::endl;
whether = true;
return when (true);
return _m_arg;
}
+ arg_type const &value (arg_type arg)
+ {
+ return seen () ? _m_arg : arg;
+ }
+
error_t parse_opt (char *arg, __attribute__ ((unused)) argp_state *state)
{
_m_seen = true;
testfiles crc7.ko.debug
-testrun_compare ./dwarflint --check check_duplicate_DW_tag_variable crc7.ko.debug <<EOF
+testrun_compare ./dwarflint --dups=0 --check check_duplicate_DW_tag_variable crc7.ko.debug <<EOF
warning: .debug_info: DIE 0x40f1: DW_AT_low_pc value not below DW_AT_high_pc.
warning: .debug_info: CU 16614: no aranges table is associated with this CU.
warning: .debug_info: DIE 0x3d21: Redeclaration of variable 'console_printk', originally seen at DIE 37f3.