Skip to content

How to measure the complexity of debug information? #113432

@IOVOVHS

Description

@IOVOVHS

The compiler generates debugging information, and the debugger knows how to debug the program by parsing the debugging information. Compared to simple debugging information, complex debugging information must be meaningful to the test debugger, the question is how to measure the complexity of debugging information? Here is a formula to measure the complexity of debugging information, probably equivalent to the significance of this program for testing a debugger. For example:

$$ debugInfoComplexity = \sum_{i=1}^n(LocExprComplexity(i)+LocRangeCount(i)+RegSwitchCount(i))+(InlineDepth*InlineFactor=1.5) $$

LocExprComplexity(i):loction expression complexity for variable i
LocRangeCount(i):Number of loction ranges
RegSwitchCount:Number of transitions of variable i between registers
InlineDepth:Depth of inlined function
inlinedFactor:maybe 1.5?

$$ CS = (1 * OpCount) + (3 * MemAccesses) + ( 2 * RegAccess) + (2* CondComp) + (1.5*StackOps) + 2.5 * TypeConv + 1.5 * ArithLogicOps $$

OpCount:Number of opcodes
MemAccesses:Number of memory accesses
RegAccess:Number of register accesses
CondComp:Number of condition calculation
TypeConv:Number of type conversion
...

My understanding of debuggers is shallow, so I can't tell if it makes some sense to use this formula to measure the complexity of a test case for testing a debugger. I'd like to get an acknowledgement or outright dismissal from the developers if I can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuginfoquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions