Git Product home page Git Product logo

python_tools's Introduction

Python_Tools

Python Tools create by myself.

c_func_tools.py 
    -r <read file> 
    -l <count lines> 
    -f <count function num> 
    -t <get func type> 
    -s <save known func type to ./type_list.txt> 
    -c <create fake func> 
    -a <Directory recursive execution> 
    --clean <Clean temp file>
    
  • Example
python3 c_func_tools.py -t c_file -c c_file
python3 c_func_tools.py -a -t project_dir -s -a -c project_dir

The Refactor function will save in the temp file.

origin File

#include "stdio.h"

const void* test_func( void* test2)
{
    void *p = NULL;
    return p;
}

Auto Refactor file

#include "stdio.h"

#include "fake_test_header.h" 
void gyc_dbg_trace_start(const void * func_addr,char* data); 
void gyc_dbg_trace_end(const void * func_addr,char* data);

const void* test_func( void* test2)
{
	void * return_value;
	gyc_dbg_trace_start((void *)test_func,NULL);
	return_value = 	test_func_fake(   test2 ) ;
	gyc_dbg_trace_end((void *)test_func,NULL);
	return return_value; 
}

void * test_func_fake( void * test2 ) 
{
    void *p = NULL;
    return p;
}

Analisys Tools

-R < Record_Time >
-D < Start Do it>
-G < Get Func addr and Create a function dictionary >
-F < Formate The log File according the function dictionary >

python3 gyc.py -RG ./you_log_File.txt -D -RF ./you_log_File.txt -D

python_tools's People

Contributors

gengyuchao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.