Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
* src/main.c (find_option_type): Check upper length limit.
|
|
|
|
|
|
* src/symbol.c (install): Initialize ord to -1.
* src/output.c (tree_output): Skip callees with ord == -1.
|
|
* src/symbol.c (collect_data): New member: count.
(collect_processor,collect_list_entry): Reallocate the syn array as
needed.
(collect_symbols): Initialize sym to NULL and count to 0.
|
|
* NEWS: Update.
* configure.ac: Version 1.6.92
* po/POTFILES.in: Add missing file.
* src/main.c (symbol_override): Detect cyclic definitions.
|
|
* configure.ac: Move wordsplit to src
* src/Makefile.am: Likewise.
* elisp/cflow-mode.el: Fix regular expressions. Character class \w
does not include _, which is allowed in identifiers.
|
|
* src/cflow.rc: Mark 'typeof' as wrapper.
* src/parser.c (expression): Allow for wrappers and explicit
structures in typecasts.
(dcl): Don't skip token that follows the wrapper.
* tests/struct.at: Test for unions in typecasts.
|
|
|
|
* src/dot.c: New file.
* src/Makefile.am: Add new file.
* src/cflow.h (dot_output_handler): New proto.
* src/main.c: Register the "dot" output format.
|
|
|
|
* src/main.c: Revise docstrings. Customize help output.
* doc/cflow.texi: Remove obsolete passage.
* po/POTFILES.in: Update.
* configure.ac: Version 1.6.91
* NEWS: Update.
|
|
The --target=F option instructs cflow to print only paths going from
the starting symbol ("main") to the function F. Multiple --target
options are allowed.
* src/cflow.h (symbol_target): New symbol flag.
(symbol) <visible>: New field.
(output_visible): New extern.
(install_target,eliminate_non_targets): New protos.
* src/main.c: New option "--target".
(include_symbol): Don't include symbol if the value of its
"visible" field doesn't equal that of output_visible.
* src/output.c: Eliminate non-target paths before tree output.
* src/parser.c: Cut off the tree at target symbols.
(get_symbol): Treat symbol_target same as symbol_start.
* src/symbol.c (target_symbol_list): New variable.
(install_starter): Don't use append_symbol to avoid setting
the "entry" symbol field.
(install_target)
(eliminate_non_targets): New functions.
|
|
* src/c.l (pp_finalize): Append \0 to obstack prior to finalizing
the object.
|
|
* doc/cflow.texi: Document changes.
* src/cflow.h (symbol_start): New flag.
(install_starter,set_default_starter,clear_starters)
(first_starter,next_starter): New protos.
* src/main.c (no_main_option): New static;
(start_name): Remove.
(main): Change handling of the --main and --no-main options.
* src/output.c (tree_output): Iterate over all defined starter
symbols.
* src/parser.c (get_symbol): Special handling for symbol_start.
* src/symbol.c (install_starter,set_default_starter,clear_starters)
(first_starter,next_starter): New functions.
|
|
|
|
This fixes CVE-2019-16165, 66
* src/cflow.h (reset_static_caller): New proto.
* src/parser.c (reset_static_caller): New function.
* src/symbol.c (delete_statics): Call reset_static_caller.
|
|
* src/parser.c (get_knr_args): Take into account qualifiers.
|
|
|
|
|
|
* doc/cflow.1: Document the --all --all behavior
* doc/cflow.texi: Likewise.
* src/main.c: Increment all_functions for each -A option.
* src/output.c (tree_output): If one --all option is used, output graphs
for all top-level functions (i.e. functions, not reachable from other ones).
If used twice, output graphs for all global function.
* tests/all.at: New test.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise.
|
|
Some constucts were processed incorrectly (see typedef.at for examples).
Unit-local types were not displayed in xref mode.
* src/cflow.h (symbol_temp): Rename to symbol_temp. All uses changed.
* src/output.c (tree_output): In all_functions mode: print all functions
without explicit caller.
* src/parser.c (save_token): Process curly braces.
(fake_struct): Don't restore stack upon encountering identifier or
modifier. See typedef.at for testcases.
(parse_variable_declaration): restore stack only if type_end is -1 (no
tag encountered). See struct06 in struct.at
(skip_struct): Minor change.
* src/parser.h: Redefine token types as enum.
* src/symbol.c (unit_local_list): New static.
(static_free): Preserve unit-local symbols in unit_local_list in xref
mode.
(collect_symbols): Consider symbols from unit_local_list.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at (CFLOW_TEST): New macro.
Include new testcases.
* tests/struct.at: New file.
* tests/typedef.at: New file.
* tests/struct01.at: Remove.
* tests/struct02.at: Remove.
* tests/struct03.at: Remove.
* tests/struct04.at: Remove.
* .gitignore: Update.
|
|
* src/output.c (tree_output): Make sure the main subtree is never
output twice.
* src/wordsplit.c: Update from grecs.
* src/wordsplit.h: Likewise.
|
|
* src/parser.c (expression): Fix parsing of type casts.
* tests/memberof.at: New test case.
* tests/testsuite.at: Add new test.
* tests/Makefile.am: Add new test.
|
|
* src/output.c (tree_output): When outputting all graphs, skip
only functions that have no source file information.
* src/parser.c (declare): Don't install symbols with empty
declarations.
|
|
|
|
* NEWS: Document --all and --no-main
* configure.ac: Version 1.5.90
* doc/cflow.texi: Document --all and --no-main
* src/cflow.h (all_functions): New extern.
* src/main.c: New options: -A (--all) and --no-main
* src/output.c (tree_output): Output all graphs if
all_functions is set or no main function is defined.
|
|
* src/main.c (main): Make sure preprocessor options are collected
before parsing source files.
|
|
|
|
* src/cflow.h (linked_list_size): New function.
* src/linked-list.c (linked_list_size): New function.
* src/symbol.c (collect_symbols): Include static symbols,
if allowed by sel.
* src/main.c (parse_opt): Exclude static symbols for --xref
|
|
* src/parser.c (tokdel): Fix amount of memory to move.
* THANKS: Niklas Angebrand
|
|
* NEWS: Version 1.5
* configure.ac: Likewise.
* src/main.c (parse_opt): Bugfix.
* src/parser.c: Include ctype.h.
* src/symbol.c (hash_symbol_hasher): Fix signature.
|
|
Don't use $@ in explicit rules.
|
|
|
|
See https://savannah.gnu.org/bugs/?44113
* src/parser.c (cleanup_stack): Ignore negative deltas.
(parse_function_declaration): Don't set caller if the symbol
is in automatic storage. Note: that means nested function definitions
can't be handled.
* tests/invalid.at: New test case.
* tests/Makefile.am: Add new test case.
* tests/testsuite.at: Likewise.
|
|
* src/parser.c (fake_struct)
(parse_variable_declaration): Correctly determine end of type.
* tests/decl01.at: New test case.
* tests/Makefile.am: Add new test.
* tests/testsuite.at (CFLOW_CHECK_PROG): Don't add extra newline
at the end of expout. All uses updated.
|
|
|
|
* doc/cflow.1: Document exit codes.
* doc/cflow.texi: Likewise.
* src/cflow.h: Define exit code constants.
* src/main.c: Use exit codes consistently.
* src/output.c: Likewise.
* src/parser.c: Likewise.
* src/posix.c: Likewise.
* src/rc.c: Likewise.
|
|
|
|
|
|
|
|
This fixes bug #31792.
* bootstrap (gnulib_extra_files): Remove "missing"
* gnulib: Upgrade
* gnulib.modules: Add xalloc.
* src/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
* src/parser.c (token_type_str)
(dbgtok,debugtoken): New diagnostic functions.
(tokdel,tokins): New functions.
(nexttoken): Clear yylval.str. Print token stack state.
(putback): Copy all data to tok. Print token stack state.
(file_error,restore
(is_function): Hanlde struct, union and enum: all these can
appear in the return type specification.
(fake_struct): Don't destroy token stack. Use tokdel and tokins
to modify it.
(parse_variable_declaration): Likewise.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
* tests/struct02.at: New file.
* tests/struct03.at: New file.
* tests/struct04.at: New file.
|
|
* NEWS: Update.
* README: Update.
* doc/cflow.texi: Update.
* src/main.c (symbol_override): pass allocated argument to install.
* src/parser.c (yyparse): Return 0.
|
|
* src/parser.c (dcl): allow for qualifier wherever a modifier
is allowed.
|
|
* doc/cflow.texi: Document symbol classes and aliases.
* src/cflow.rc: Minor change.
* src/main.c: Mention aliasing feature in the docstring for --symbol.
|
|
The latter feature is useful for declaring reserved symbols such
as __restrict or __inline, e.g. --symbol __restrict:=restrict
instructs cflow to treat `__restrict' exactly as `restrict'.
* src/Makefile.am: Minor fix in rule for flowgraph.
* src/c.l (init_tokens): New function, separated from
init_lex.
Install qualifiers.
* src/cflow.h (symbol_alias): New flag.
(symbol)<alias>: New member.
(INSTALL_DEFAULT,INSTALL_OVERWRITE)
(INSTALL_CHECK_LOCAL,INSTALL_UNIT_LOCAL): New defines.
* src/cflow.rc: Rewrite for use with --cpp='gcc -E'
* src/main.c (symbol_override): Extend syntax to allow for defining
aliases to other tokens (--symbol __inline:=inline).
* src/parser.c (print_token): print qualifiers and ops.
(file_error): Change signature. All uses changed.
(save_token): Improve output spacing.
(skip_balanced): Treat LBRACE0 and RBRACE0 as { and }.
(is_function): allow for qualifiers and wrappers before
defintion.
(parse_function_declaration): Remove PARM_WRAPPER case: it
is taken care of by the caller.
(fake_struct): leave when '(' is encountered.
(parse_variable_declaration): Allow for qualifiers before
the identifier.
(skip_struct): Use skip_balanced.
(dcl): Handle wrappers. Leave if a semicolon is encountered.
(dirdcl): Optimize handing of wrapper.
(maybe_parm_list): Handle qualifiers.
(declare): allow for wrappers.
(declare_type): Pass INSTALL_UNIT_LOCAL as a flag to install.
* src/symbol.c (lookup): Argument is const now.
(install): Change semantics of the 2nd argument.
(install_ident): Change the call to install accordingly.
* tests/nfparg.at: Change spacing to reflect changes to
save_token.
|
|
* src/cflow.h (install): Change prototype.
* src/parser.c (skip_balanced): Don't put extra token back.
* src/symbol.c (install): Take two arguments, the 2nd one
specifying whether the symbol can be local to the compilation
unit. All uses updated.
(delete_symbol): Don't delete symbol in reverse tree mode, if
its callee list is not empty.
|
|
* src/parser.c (save_token): Hanlde [ and ]. Do not enforce
space after ).
* tests/fdecl.at: Reflect changes in spacing.
* tests/knr.at: Likewise.
* tests/multi.at: Likewise.
* tests/pwrapper.at: Likewise.
* tests/struct00.at: Likewise.
* tests/struct01.at: Likewise.
|