# US 2019/0377662 A1 · Identifying a source file for use in debugging compiled code

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0377662 A1
- Document ID: US20190377662A1
- Status: Published application
- Kind: A1
- Application number: 16/000,961
- Filed: 2018-06-06
- Published: 2019-12-12
- Earliest claimed: 2018-06-06
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Timothy J. Mitchell; Graham C. Charters; Lewis Evans; Adam J. Pilkington
- Web page: https://patentgrep.com/patent/US20190377662A1

## CPC

- G06F 8/75: Structural analysis for program understanding
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 8/41: Compilation
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Method and system are provided for identifying a source file for use in debugging compiled code. The method includes referencing a compiled file for debugging and searching for potential source files of the compiled file from configured repositories. The method obtains the potential source files from the configured repositories and iterates over the obtained potential source files to compile and compare each potential source file to the compiled file. One or more matching source files are identified for use in debugging the compiled file.

## Claims

### Claim 1

A computer-implemented method for identifying a source file for use in debugging compiled code, comprising:
referencing a compiled file of non human-readable form for debugging;
searching for potential source files of the compiled file from configured repositories;
obtaining the potential source files from the configured repositories;
iterating over the obtained potential source files to compile and compare each potential source file to the compiled file; and
identifying one or more matching source files for use in debugging the compiled file.

### Claim 2 (depends on 1)

The method as claimed in claim 1, wherein comparing each potential source file to the compiled file includes:
comparing field and/or method signatures of the source file when compiled with the compiled file.

### Claim 3 (depends on 1)

The method as claimed in claim 1, wherein comparing each potential source file to the compiled file includes:
comparing bytecode of the source file when compiled with the compiled file.

### Claim 4 (depends on 1)

The method as claimed in claim 1, including configuring source repositories including local and/or remote repositories of source files.

### Claim 5 (depends on 1)

The method as claimed in claim 1, wherein more than one matching source file is identified and the method includes selecting a source file from the matching source files for use in debugging the compiled file.

### Claim 6 (depends on 5)

The method as claimed in claim 5, wherein selecting a source file from the matching source files uses selection rules to determine a most recent source file or originating location of a source file.

### Claim 7 (depends on 1)

The method as claimed in claim 1, wherein if no matching source file is identified, decompiling the compiled file and using the decompiled output in debugging the compiled file.

### Claim 8 (depends on 1)

The method as claimed in claim 1, wherein the method is carried out at the point the debugging tool needs to step through a compiled file with no source file available.

### Claim 9 (depends on 1)

The method as claimed in claim 1, wherein the method is carried out at server start or on a background thread prior to a debugging tool requiring a source file.

### Claim 10

A system for identifying a source file for use in debugging compiled code, comprising: a computer readable memory, a processing unit communicatively coupled to the computer readable memory, a computer readable storage medium, and program instructions stored on the computer readable storage medium that when executed by the processing unit execute the method comprising:
one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising:
referencing a compiled file of non human-readable form for debugging;
searching for potential source files of the compiled file from configured repositories;
obtaining the potential source files from the configured repositories;
iterating over the obtained potential source files to compile and compare each potential source file to the compiled file; and
identifying one or more matching source files for use in debugging the compiled file.

### Claim 11 (depends on 10)

The system as claimed in claim 10, wherein the comparing includes comparing field and/or method signatures of the source file when compiled with the compiled file.

### Claim 12 (depends on 10)

The system as claimed in claim 10, further comprising:
comparing bytecode of the source file when compiled with the compiled file.

### Claim 13 (depends on 10)

The system as claimed in claim 10, further comprising: configuring source repositories including local and/or remote repositories of source files.

### Claim 14 (depends on 10)

The system as claimed in claim 10, including a selection component wherein more than one matching source file is identified and the selection component selects a source file from the matching source files for use in debugging the compiled file.

### Claim 15 (depends on 14)

The system as claimed in claim 14, wherein the selection component selects a source file from the matching source files using selection rules to determine a most recent source file or originating location of a source file.

### Claim 16 (depends on 10)

The system as claimed in claim 10, including a decompiler actuating component for, if no matching source file is identified, decompiling the compiled file and using the decompiled output in debugging the compiled file.

### Claim 17 (depends on 10)

The system as claimed in claim 10, wherein the system is provided as part of an integrated development environment including a debugging tool.

### Claim 18 (depends on 17)

The system as claimed in claim 17, wherein the system is activated at the point the debugging tool needs to step through a binary file with no source file available.

### Claim 19 (depends on 10)

The system as claimed in claim 10, wherein the system is activated at a server start or on a background thread prior to a debugging tool requiring a source file.

### Claim 20

A computer program product for identifying a source file for use in debugging compiled code, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
reference a compiled file of non human-readable form for debugging;
search for potential source files of the compiled file from configured repositories;
obtain the potential source files from the configured repositories;
iterate over the obtained potential source files to compile and compare each potential source file to the compiled file; and
identify one or more matching source files for use in debugging the compiled file.
