Skip to content

Generate function body returns misleading error message #2974

@polgreen

Description

@polgreen

Generate function body will not generate a body for a function that already has a body, which isn't clear from the help file or the internal documentation, and the error message given is
"generate function bodies: No function name matched regex"

Example:

int generate_my_body();
int replace_my_body()
{
  return 1;
}

int main(void)
{
generate_my_body();
replace_my_body();
}

This call works:

goto-instrument --generate-function-body generate_my_body --generate-function-body-options assert-false in.gb out.gb

This call does not, and gives the error message "generate function bodies: No function name matched regex"

goto-instrument --generate-function-body replace_my_body --generate-function-body-options assert-false in.gb out.gb

@hannes-steffenhagen-diffblue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions