Skip to content

This project has for objective to extract all possibles information out of a java call stack in a text file

Notifications You must be signed in to change notification settings

moosetechnology/JavaCallStackExtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaCallStackExtractor

JavaCallStackExtractor is a tool designed to extract as much information as possible from a Java call stack stored in a text-based file.
It was created to provide a parser for Java call stacks, enabling their analysis within the Moose software analysis platform by generating a dedicated meta-model.
For More information about this meta-model see the FamixCallStack project.

How to use

This tool requires Java version 9 to 21.
Newer versions might work, but have not been tested.
It is highly recommended to use the same Java version for both the program you want to analyze and the extractor (for example, if your application is executed in Java 9, the extractor should be cexecuted on Java 9).
Using different versions may lead to unexpected behavior.

Step 0: Make at least a maven build to imports necessary libraries

Step 1: Run the Target Program in Debug Mode

Launch the program you want to analyze with the following VM argument:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006 

In Eclipse, you can add this argument in the Run Configuration > VM Arguments section:

This command enables debug mode on the Java VM:

  • jdwp: Java Debug Wire Protocol
  • transport=dt_socket: Enables socket-based communication
  • server=y: Starts the JVM in debug server mode (waits for a debugger)
  • suspend=y: JVM execution is paused until a debugger connects
  • address=5006: Port used to wait for debugger connection

Step 2: Configure the Extractor

Edit the config.json file to fit the structure of your project. Refer to config.md for detailed instructions.

Step 3: Run the Extractor

Execute the main method of JDICallstackExtractor. The output will be generated in the root directory of this repository.

About

This project has for objective to extract all possibles information out of a java call stack in a text file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages