The NetBSD Project

CVS log for src/usr.bin/xlint/lint1/debug.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / xlint / lint1

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Sat Jan 21 13:07:22 2023 UTC (2 weeks, 3 days ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored)

lint: add support for the C11 type qualifier '_Atomic'

That keyword can be used as a type specifier as well, support for that
will be added later.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jan 8 14:05:02 2023 UTC (4 weeks, 2 days ago) by rillig
Branch: MAIN
Changes since 1.23: +35 -29 lines
Diff to previous 1.23 (colored)

lint: unclutter debug logging for nodes

No functional change.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 16 22:23:38 2022 UTC (6 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

lint: add missing space before func_proto_sym in debug mode

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jul 3 14:15:38 2022 UTC (7 months ago) by rillig
Branch: MAIN
Changes since 1.21: +33 -2 lines
Diff to previous 1.21 (colored)

lint: add debug logging for struct and enum details

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 26 16:45:25 2022 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +4 -3 lines
Diff to previous 1.20 (colored)

lint: fix spacing and line breaks in debug logging

The spacing between function arguments in a declaration info was too
big, it was the indentation level instead of a single space.

The function debug_sym is used for two purposes: own-line and in-line,
which coincidentally are distinguished by whether the suffix string is
"\n".

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 26 12:04:56 2022 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +18 -9 lines
Diff to previous 1.19 (colored)

lint: improve debug logging for NAME expressions

In a NAME expression, the name is an essential part, so put it to the
front, in natural reading order.

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 26 11:54:33 2022 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

lint: add missing newlines in debug_node

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 20 21:18:55 2022 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

lint: use __RCSID in lint mode as well

Since 1995-10-02, lint supports __asm statements and __asm modifiers.

No binary change.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Apr 9 23:41:22 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.16: +20 -5 lines
Diff to previous 1.16 (colored)

lint: distinguish between storage class and declaration kind

These types overlap but are not the same.

No functional change.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Apr 9 21:19:52 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

lint: rename dinfo_t.d_offset to d_offset_in_bits

Most often, offsets are measured in bytes, so better embed the unit in
the variable name.

No functional change.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 9 16:02:14 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.14: +3 -4 lines
Diff to previous 1.14 (colored)

lint: extract is_member into separate function

No functional change.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Apr 9 15:43:41 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.13: +16 -11 lines
Diff to previous 1.13 (colored)

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Apr 9 14:50:18 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Apr 9 13:38:17 2022 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.11: +9 -8 lines
Diff to previous 1.11 (colored)

lint: inline member access macros for sym_t

Having the 'u.' explicitly in the code serves as a reminder that these
members are only defined under certain conditions.

No functional change.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 2 14:28:30 2022 UTC (10 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

lint: rename dinfo_t.d_next to d_enclosing

The name d_next gave the wrong impression that the declaration infos
would be independent of each other, but they are nested.

No functional change.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Apr 2 12:24:54 2022 UTC (10 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.9: +80 -8 lines
Diff to previous 1.9 (colored)

lint: add debug logging for the declaration stack

To track down the wrong edge cases in decl_direct_abstract.c.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 1 00:17:12 2022 UTC (11 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.8: +141 -4 lines
Diff to previous 1.8 (colored)

lint: add debug logging for symbols and the symbol table

This logging is not active by default, the functions debug_sym and
debug_symtab can be called as needed during a debug session.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 27 18:29:14 2022 UTC (11 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.7: +9 -10 lines
Diff to previous 1.7 (colored)

lint: merge duplicate code for handling plain and wide strings

No functional change.  As before, the string literals "1" "2" "3" are
not concatenated from left to right, instead concatenation starts with
"23" and then proceeds to "123".

Revision 1.7 / (download) - annotate - [select for diffs], Tue Dec 21 21:04:08 2021 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

lint: rename debug_indent to debug_print_indent

The previous name could be mistaken to mean "increase the indentation of
the debug output".  Instead, the function prints the current indentation.

In externs1.h, the macro definition was a duplicate, the macros were
sorted differently than the functions a few lines above.

No binary change.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 20 00:10:07 2021 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

lint: in debug mode, output value of boolean expressions

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 16 21:01:05 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool.  This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types.  For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 16 06:55:03 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +5 -4 lines
Diff to previous 1.3 (colored)

tests/lint: explain the missing error message in strict bool mode

There are 2 separate bugs that lead to the missing error message.

The first bug is that when parsing a name, the information about whether
that name comes from a system header is not properly recorded for the
last token before switching from or to a system header.

The second bug is that for determining whether the type of a function
call expression is relaxed, the types of the function call arguments are
taken into account, even though the type only depends on the function
itself.  The same idea applies to the operators '<<' and '>>', as their
result type only depends on the left operand, at least since C90.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 22 21:27:15 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

lint: merge duplicate code for binary operator

No functional change.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 19:11:54 2021 UTC (18 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.1: +33 -17 lines
Diff to previous 1.1 (colored)

lint: merge duplicate debugging code

The functions 'debug_node' and 'display_expression' were similar enough
to be merged.

Migrate debug_node to use the existing debug logging functions.

Remove the now unused option 'd' from the options string.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jul 31 18:16:42 2021 UTC (18 months, 1 week ago) by rillig
Branch: MAIN

lint: extract debug logging to separate file

Lint currently has several different kinds of debug log:

* The -DDEBUG log is controlled at compile time.
* The -d command line options enables some other debug logging.
* The -DYYDEBUG log for parsing is controlled at compile time.
* The -y command line option only has an effect in -DYYDEBUG mode.

Extracting the logging into a separate file is a first step towards
unifying these logs and making the code for debug logging stand out less
than the current #ifdef DEBUG.

No functional change.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>