Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt a standard naming convention and signature for debug functions #5508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jejones3141
Copy link
Contributor

To get the "dd" debugger command to work without having to create an wxplicit mapping from type to function either by hand or by runtime inspection (the latter preventing setting up the command at debugger startup), the debug functions that dd calls should have a type of the form

foo_debug(FILE *fp, foo_t const *)

We add the qualifier becausen

  • some support functions with extra parameters are meant to be called by these functions, which pass the additional parameters; the functions we do call can pass fp along, or in the case of src/lib/util/dict_print.c, add fp to the context
  • fe_dict_attr_t * has three debug functions
  • fr_pair_validate_debug() takes a pointer to an array, and thus can't follow the convention
  • virtual_server_{listen, process}_debug() and module_rlm_list_debug() have no parameters

To get the "dd" debugger command to work without having to create an
wxplicit mapping from type to function either by hand or by runtime
inspection (the latter preventing setting up the command at debugger
startup), the debug functions that dd calls should have a type of
the form

    foo_debug(FILE *fp, foo_t const *)

We add the qualifier becausen
 * some support functions with extra parameters are meant to be
   called by these functions, which pass the additional parameters;
   the functions we do call can pass fp along, or in the case of
   src/lib/util/dict_print.c, add fp to the context
 * fe_dict_attr_t * has three debug functions
 * fr_pair_validate_debug() takes a pointer to an array, and
   thus can't follow the convention
 * virtual_server_{listen, process}_debug() and module_rlm_list_debug()
   have *no* parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant