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

Insturment if statements with control flow logger #14

Open
bestchai opened this issue May 26, 2020 · 0 comments
Open

Insturment if statements with control flow logger #14

bestchai opened this issue May 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@bestchai
Copy link
Member

bestchai commented May 26, 2020

#Overview
all if statements must be instrumented with calls to the cflogger. The root of each if statement should be matched with a call to setFalse(), and the internal of each statement should be matched with setTrue().

During the code injection phase of instrumentation, only variables affected by data flow of true marked if statements should be logged.

#Example
This example involves file source.go in package main

##Before

#!go
    0   if ( conditional ) {
    1       doIt()
    2    } else {
    3         doItAnyways()
    4    }

After

#!go
   0   instrumenter.Cflogger.setFalse("main_source_ifstatement_L0")
   1   if ( conditional ) {
   2       instrumenter.Cflogger.setTrue("main_source_if_L0")
   3       doIt()
   4   }  else {
   5       instrumenter.Cflogger.setTrue("main_source_else_L2")
   6       doItAnyways()
   7   }

[Issue created by wantonsolutions: 2015-08-21]

@bestchai bestchai added the enhancement New feature or request label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant