This commit is contained in:
acite
2025-02-24 20:27:28 +08:00
parent 4a7622807a
commit ad2f85d6e1
36 changed files with 3981 additions and 1091 deletions

580
.idea/editor.xml generated Normal file
View File

@@ -0,0 +1,580 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BackendCodeEditorSettings">
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexRemoved" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -1,17 +1,30 @@
cmake_minimum_required(VERSION 3.28)
project(aldbg)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
include_directories(.)
add_compile_options(-Og)
find_package(PkgConfig)
pkg_check_modules(GTKMM gtkmm-3.0)
pkg_check_modules(GTKMM gtkmm-4.0)
include_directories(${GTKMM_INCLUDE_DIRS})
link_directories(${GTKMM_LIBRARY_DIRS})
add_definitions(${GTKMM_CFLAGS_OTHER})
add_executable(aldbg
main.cpp cpu/cpu.cpp core/attach.cpp core/core.cpp log/log.cpp)
pkg_check_modules(CAPSTONE capstone)
target_link_libraries(aldbg ${GTKMM_LIBRARIES})
include_directories(${CAPSTONE_INCLUDE_DIRS})
link_directories(${CAPSTONE_LIBRARY_DIRS})
add_definitions(${CAPSTONE_CFLAGS_OTHER})
pkg_check_modules(ELFPP libelf++)
include_directories(${ELFPP_INCLUDE_DIRS})
link_directories(${ELFPP_LIBRARY_DIRS})
add_definitions(${ELFPP_CFLAGS_OTHER})
add_executable(aldbg main.cpp)
target_link_libraries(aldbg ${GTKMM_LIBRARIES} ${CAPSTONE_LIBRARIES} ${ELFPP_LIBRARIES})

View File

@@ -1,850 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2
The MIT License (MIT)
Copyright (c)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<interface>
<requires lib="gtk+" version="3.24"/>
<!-- interface-license-type mit -->
<!-- interface-name aldug -->
<!-- interface-description Debuger with user interface in Linux -->
<object class="GtkListStore" id="codeView">
<columns>
<!-- column-name Address -->
<column type="gchararray"/>
<!-- column-name Data -->
<column type="gchararray"/>
<!-- column-name Disassembly -->
<column type="gchararray"/>
<!-- column-name Status -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="dialogAttach">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center-on-parent</property>
<property name="type-hint">dialog</property>
<property name="skip-taskbar-hint">True</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="dAttach">
<property name="label" translatable="yes">Attach</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="dCancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=8 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">6</property>
<property name="column-spacing">5</property>
<child>
<object class="GtkLabel">
<property name="height-request">30</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">File Path:</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="height-request">30</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Command Args:</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkTextView">
<property name="width-request">450</property>
<property name="height-request">30</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkTextView">
<property name="width-request">450</property>
<property name="height-request">30</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">7</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">7</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkListStore" id="logView">
<columns>
<!-- column-name Time -->
<column type="gchararray"/>
<!-- column-name Data -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="regView">
<columns>
<!-- column-name Registers -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow" id="MainWindow">
<property name="can-focus">False</property>
<property name="window-position">center-always</property>
<property name="default-width">1280</property>
<property name="default-height">720</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkStackSidebar" id="bar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stack">stack</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child>
<!-- n-columns=15 n-rows=13 -->
<object class="GtkGrid" id="pageCPU">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
<child>
<object class="GtkTreeView" id="reg">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">regView</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="regViewRegisters">
<property name="title" translatable="yes">Registers</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">13</property>
<property name="top-attach">0</property>
<property name="width">2</property>
<property name="height">13</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton" id="bRestart">
<property name="label" translatable="yes">Restart</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bStop">
<property name="label" translatable="yes">Stop</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bSuspend">
<property name="label" translatable="yes">Pause</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bCont">
<property name="label" translatable="yes">Continue</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bStepinto">
<property name="label" translatable="yes">Goin</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bStepNext">
<property name="label" translatable="yes">Next</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bTraceinto">
<property name="label" translatable="yes">Tracein</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bTracenext">
<property name="label" translatable="yes">Point</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkButton" id="bEscape">
<property name="label" translatable="yes">Escape</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="width">13</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="code">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">codeView</property>
<property name="search-column">0</property>
<property name="ubuntu-almost-fixed-height-mode">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="codeViewStatus">
<property name="title" translatable="yes">Status</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="codeViewAddress">
<property name="min-width">100</property>
<property name="title" translatable="yes">Address</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="codeViewData">
<property name="min-width">100</property>
<property name="title" translatable="yes">Data</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="codeViewDisa">
<property name="title" translatable="yes">Disassembly</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="width">13</property>
<property name="height">9</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="mem">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-column">2</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
<property name="width">13</property>
<property name="height">3</property>
</packing>
</child>
</object>
<packing>
<property name="name">CPU</property>
<property name="title" translatable="yes">CPU</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="pageMemory">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">Memory</property>
<property name="title" translatable="yes">Memory</property>
<property name="position">1</property>
</packing>
</child>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="pageLog">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="log">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">logView</property>
<property name="search-column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="TimeCol">
<property name="min-width">85</property>
<property name="title" translatable="yes">Time</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="DataCol">
<property name="title" translatable="yes">Data</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="name">Log</property>
<property name="title" translatable="yes">Log</property>
<property name="position">2</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="pageBreakpoints">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">Breakpoints</property>
<property name="title" translatable="yes">Breakpoints</property>
<property name="position">3</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="pageCall">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">Call Stack</property>
<property name="title" translatable="yes">Call Stack</property>
<property name="position">4</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="pageSymbols">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">Symbols</property>
<property name="title" translatable="yes">Symbols</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="title" translatable="yes">Aldbg x64</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkButton" id="bAttach">
<property name="label" translatable="yes">Attach</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
</child>
</object>
</child>
</object>
</interface>

676
aldbg.ui Normal file
View File

@@ -0,0 +1,676 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkPopover" id="popover1">
<property name="can-focus">False</property>
<property name="width-request">350</property>
<property name="height-request">600</property>
<child>
<object class="GtkScrolledWindow">
<property name="focusable">1</property>
<property name="child">
<object class="GtkBox" id="popover1Box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
</object>
</property>
</object>
</child>
</object>
<object class="GtkDialog" id="dialogAttach">
<property name="resizable">0</property>
<property name="modal">true</property>
<child internal-child="content_area">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkGrid">
<property name="row-spacing">6</property>
<property name="column-spacing">5</property>
<child>
<object class="GtkLabel">
<property name="height-request">30</property>
<property name="label" translatable="1">File Path:</property>
<layout>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="height-request">30</property>
<property name="label" translatable="1">Command Args:</property>
<layout>
<property name="column">0</property>
<property name="row">4</property>
</layout>
</object>
</child>
<child>
<object class="GtkTextView" id="tExecutable">
<property name="width-request">450</property>
<property name="height-request">30</property>
<property name="focusable">1</property>
<layout>
<property name="column">1</property>
<property name="row">2</property>
<property name="column-span">6</property>
</layout>
</object>
</child>
<child>
<object class="GtkTextView" id="tArg">
<property name="width-request">450</property>
<property name="height-request">30</property>
<property name="focusable">1</property>
<layout>
<property name="column">1</property>
<property name="row">4</property>
<property name="column-span">6</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<layout>
<property name="column">7</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<layout>
<property name="column">7</property>
<property name="row">4</property>
</layout>
</object>
</child>
</object>
</child>
<child internal-child="action_area">
<object class="GtkBox">
<child>
<object class="GtkButton" id="dAttach">
<property name="label" translatable="1">Attach</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
<child>
<object class="GtkButton" id="dCancel">
<property name="label" translatable="1">Cancel</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkListStore" id="logView">
<columns>
<column type="gchararray"/>
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="regView">
<columns>
<column type="gchararray"/>
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="memView">
<columns>
<column type="gchararray"/>
<column type="gchararray"/>
<column type="gchararray"/>
<column type="gchararray"/>
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow" id="MainWindow">
<property name="default-width">1280</property>
<property name="default-height">720</property>
<property name="child">
<object class="GtkBox">
<child>
<object class="GtkStackSidebar" id="bar">
<property name="stack">stack</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="debugBox">
<property name="valign">center</property>
<child>
<object class="GtkButton" id="bRestart">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-restart.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bStop">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/control-stop.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bSuspend">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/control-pause.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bCont">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-run.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bStepinto">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-step-into.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bStepover">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-step-over.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bGoto">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-skip.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="bEscape">
<child>
<object class="GtkImage">
<property name="file">../interface/icon/arrow-step-rtr.png</property>
</object>
</child>
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkMenuButton" id="mSymbols">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="popover">popover1</property>
<child>
<object class="GtkLabel" id="currentSymbol">
<property name="label" translatable="1">_start()</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="bTryParse">
<property name="focusable">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">Parse</property>
</object>
</child>
<layout>
<property name="column">0</property>
<property name="row">0</property>
<property name="column-span">13</property>
</layout>
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="hexpand">1</property>
<child>
<object class="GtkStackPage">
<property name="name">CPU</property>
<property name="title" translatable="1">CPU</property>
<property name="child">
<object class="GtkGrid" id="pageCPU">
<property name="orientation">vertical</property>
<property name="row-homogeneous">0</property>
<property name="column-homogeneous">1</property>
<child>
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkTreeView" id="reg">
<property name="focusable">1</property>
<property name="model">regView</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="regViewRegister">
<property name="title" translatable="1">Register</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="regViewValue">
<property name="title" translatable="1">Value</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</property>
<layout>
<property name="column">13</property>
<property name="row">0</property>
<property name="column-span">2</property>
<property name="row-span">13</property>
</layout>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkColumnView" id="code">
<property name="focusable">1</property>
</object>
</property>
<layout>
<property name="expand">True</property>
<property name="column">0</property>
<property name="row">0</property>
<property name="column-span">13</property>
<property name="row-span">10</property>
</layout>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkTreeView" id="mem">
<property name="focusable">1</property>
<property name="tooltip-column">2</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">column</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">column</property>
</object>
</child>
</object>
</property>
<layout>
<property name="column">0</property>
<property name="row">10</property>
<property name="column-span">13</property>
<property name="row-span">3</property>
</layout>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">Memory</property>
<property name="title" translatable="1">Segments</property>
<property name="child">
<object class="GtkScrolledWindow">
<property name="focusable">1</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkTreeView" id="memory">
<property name="focusable">1</property>
<property name="model">memView</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">Start Address</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">End Address</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">Permission</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">Offset</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="1">Path</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">Log</property>
<property name="title" translatable="1">Log</property>
<property name="child">
<object class="GtkGrid" id="pageLog">
<child>
<object class="GtkScrolledWindow" id="logScroll">
<property name="focusable">1</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkTreeView" id="log">
<property name="focusable">1</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="model">logView</property>
<property name="search-column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="TimeCol">
<property name="min-width">85</property>
<property name="title" translatable="1">Time</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="DataCol">
<property name="title" translatable="1">Data</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage" id="bpPage">
<property name="name">Breakpoints</property>
<property name="title" translatable="1">Breakpoints</property>
<property name="child">
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkColumnView" id="breakpoints">
<property name="focusable">1</property>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">Call Stack</property>
<property name="title" translatable="1">Call Stack</property>
<property name="child">
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkColumnView" id="callstack">
<property name="focusable">1</property>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">Symbols</property>
<property name="title" translatable="1">Symbols</property>
<property name="child">
<object class="GtkColumnView" id="symbols">
<property name="focusable">1</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">Editor</property>
<property name="title" translatable="1">Memory</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkButton" id="bMemPush">
<property name="label" translatable="1">Push</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
<child>
<object class="GtkButton" id="bMemPull">
<property name="label" translatable="1">Pull</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
<child>
<object class="GtkTextView" id="tMemoryAddress">
<property name="width-request">450</property>
<property name="focusable">1</property>
<property name="valign">center</property>
<layout>
<property name="column">1</property>
<property name="row">2</property>
<property name="column-span">6</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton" id="bMemJump">
<property name="label" translatable="1">Jump</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="focusable">1</property>
<property name="child">
<object class="GtkColumnView" id="editor">
<property name="focusable">1</property>
</object>
</property>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="HeaderBar">
<child>
<object class="GtkBox">
<child>
<object class="GtkButton" id="bAttach">
<property name="label" translatable="1">Attach</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="hexpand">1</property>
<child>
<object class="GtkLabel" id="windowTitle">
<property name="halign">center</property>
<property name="label" translatable="1">Aldbg</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

964
core/Core.hpp Normal file
View File

@@ -0,0 +1,964 @@
//
// Created by acite on 5/1/24.
//
#ifndef _H_CORE
#define _H_CORE 1
#include <gtkmm.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/user.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include "MemoryMap.hpp"
#include <capstone/capstone.h>
#include <fstream>
#include <libelfin/elf/elf++.hh>
#include <map>
#include <unordered_map>
#include <capstone/capstone.h>
#define WORD_SIZE 8
enum Msg{
MSG_PAUSE = 0,
MSG_STOP = 1,
MSG_CONTINUE = 2,
MSG_STARTUP = 3,
MSG_REG = 4,
MSG_QUIT = 5,
MSG_LOG = 6,
MSG_ASM = 7,
MSG_TITLE = 8,
MSG_STEPINTO = 9,
MSG_MEMORY = 10,
MSG_SELECT = 11,
MSG_CURRENTSYMBOL = 12,
MSG_RESTART = 13,
MSG_BREAK = 14,
MSG_STEPOVER = 15,
MSG_SYMBOLS = 16,
MSG_SWITCHSYMBOL= 17,
MSG_NONSYM = 18,
MSG_PARSE = 19,
MSG_INSYM = 20,
MSG_DELBREAK = 21,
MSG_SWITCHMODULE= 22,
MSG_GETBREAKS = 23,
MSG_CALLSTACK = 24,
MSG_BREAKONCE = 25
};
struct DebugCommand
{
char id;
void* param;
};
struct BreakPoint
{
uint64_t addr;
bool once;
uint64_t origin;
uint16_t size;
bool enable;
};
struct Symbol{
char name[255];
uint64_t address;
uint64_t size;
uint64_t base;
};
struct CallstackStruct
{
uint64_t callPoint;
uint64_t stackBase;
Symbol symbol;
char module[255];
int depth;
};
class Core{
private:
std::map<uint64_t, BreakPoint> _breakPoints;
int _ep = -1;
uint64_t _lastRip = 0;
int _counter = 0;
uint64_t _needToRestore = 0;
public:
const uint64_t int3 = 0xCCCCCCCCCCCCCCCC;
int pipe = -1;
int remotePipe = -1;
user_regs_struct regs;
std::vector<Symbol> symbols;
std::vector<Symbol> staticSymbols;
std::unordered_map<std::string, std::vector<Symbol>> symbolMap;
Symbol currentSymbol{};
void PeekTexts(uint64_t* data, uint64_t words) const
{
auto addr = _lastRip;
for(uint64_t i=0;i<words;i++)
{
data[i] = ptrace(PTRACE_PEEKTEXT, _process, addr + i * 8, NULL);
}
}
void PeekTextsFrom(uint64_t* data, uint64_t words, uint64_t address) const
{
for(uint64_t i=0;i<words;i++)
{
data[i] = ptrace(PTRACE_PEEKTEXT, _process, address + i * 8, NULL);
}
}
/*
void PeekTextsFrom(uint64_t address, uint64_t size)
{
delete[] codeData;
codeSize = size;
codeData = new uint8_t[codeSize + 16];
codeAddr = address;
for(uint64_t p = codeAddr, offset = 0; p < codeAddr + codeSize; p += WORD_SIZE, offset += WORD_SIZE)
{
*(uint64_t*)(codeData + offset) = ptrace(PTRACE_PEEKDATA, _process, p, nullptr);
}
}
void RestoreCode()
{
for(auto k: _breakPoints) // Repair Breakpoint code
{
if(k.second.enable && k.second.addr >= codeAddr && k.second.addr < codeAddr + codeSize)
{
uint64_t localOffset = k.second.addr - codeAddr;
auto px = reinterpret_cast<uint64_t*>(codeData + localOffset);
uint64_t mask = 0xFFFFFFFFFFFFFFFF << k.second.size * 8;
*px = (k.second.origin & (~mask)) | ((*px) & mask);
}
}
}
*/
uint64_t GetBaseAddress()
{
if(_map == nullptr) return 0;
for(int i=0;i<_map->Size();i++)
{
auto j = _map->GetItem(i);
if(_path == j.path)
{
return j.startAddress;
}
}
return 0;
}
uint64_t GetBaseAddress(const std::string& module)
{
if(_map == nullptr) return 0;
for(int i=0;i<_map->Size();i++)
{
auto j = _map->GetItem(i);
if(module == j.path)
{
return j.startAddress;
}
}
return 0;
}
uint64_t GetEndAddress(const std::string& module)
{
if(_map == nullptr) return 0;
uint64_t endAddr = 0;
for(int i=0;i<_map->Size();i++)
{
auto j = _map->GetItem(i);
if(module == j.path)
{
endAddr = j.endAddress;
}
}
return endAddr;
}
uint64_t GetEntryPoint()
{
int fd = open(_path.c_str(), O_RDONLY);
if(fd < 0) return 0;
elf::elf ef(elf::create_mmap_loader(fd));
return ef.get_hdr().entry;
}
std::vector<Symbol> GetSymbols(const std::string& module)
{
std::vector<Symbol> tr;
std::map<std::string, Symbol> r;
uint64_t lbase = GetBaseAddress(module);
uint64_t ebase = GetEndAddress(module);
if(symbolMap.contains(module))
{
tr = symbolMap[module];
}
else
{
int fd = open(module.c_str(), O_RDONLY);
if(fd < 0) return {};
elf::elf ef(elf::create_mmap_loader(fd));
for (const auto& section : ef.sections()) {
if (section.get_hdr().type == elf::sht::symtab) {
const auto& lsymbols = section.as_symtab();
for (const auto& symbol : lsymbols) {
if (symbol.get_data().type() == elf::stt::func && symbol.get_data().value != 0) {
// A symbol with zero address maybe an extern symbol in (.so)
// We will not place it in local module symbol list
// Because we fill find its body in the symbol table of another modules
Symbol h{};
strcpy(h.name, symbol.get_name().c_str());
h.address = symbol.get_data().value;
h.size = symbol.get_data().size;
h.base = lbase;
r.emplace(symbol.get_name(), h);
}
}
}
}
for (const auto& section : ef.sections()) {
if (section.get_hdr().type == elf::sht::dynsym) {
const auto& lsymbols = section.as_symtab();
for (const auto& symbol : lsymbols) {
if (symbol.get_data().type() == elf::stt::func && symbol.get_data().value != 0 && (!r.contains(symbol.get_name()))) {
Symbol h{};
strcpy(h.name, symbol.get_name().c_str());
h.address = symbol.get_data().value;
h.size = symbol.get_data().size;
h.base = lbase;
r.emplace(symbol.get_name(), h);
}
}
}
}
for(const auto& j : r)
{
tr.emplace_back(j.second);
}
for(auto &k : tr)
{
if(k.size == 0) // Unmarked Symbol
{
// Find a symbol following behind it
uint64_t addr = 0xffffffffffffffff;
for(auto &j : tr)
{
if(j.address > k.address && j.address < addr) addr = j.address;
}
if(addr != 0xffffffffffffffff){ k.size = addr - k.address; continue; }
// Found no Symbol
// Set its size to the end of its section
for (const auto& section : ef.sections())
{
if(k.address > section.get_hdr().addr && k.address < section.get_hdr().addr + section.size())
{
k.size = section.get_hdr().addr + section.size() - k.address;
}
}
}
}
symbolMap.emplace(module, tr);
}
for(const auto &k : staticSymbols)
{
if(k.address >= lbase && k.address < ebase)
{
bool within = false;
for(const auto &j : tr)
{
if(k.address >= j.address + j.base && k.address < j.address + j.size + j.base)
{
within = true;
break;
}
}
if(!within) tr.emplace_back(k);
}
}
return tr;
}
void InsertBreakPoint(uint64_t addr, bool once = true)
{
if(_breakPoints.contains(addr)) return;
auto ins = disassemblyFrom(addr, 1, 0);
BreakPoint bp{};
bp.once = once;
bp.addr = addr;
bp.origin = ptrace(PTRACE_PEEKTEXT, _process, addr, NULL);
bp.size = ins[0].size;
if(bp.size > 8) bp.size = 8;
bp.enable = true;
uint64_t mask = 0xFFFFFFFFFFFFFFFF << bp.size * 8;
uint64_t int3_data = (bp.origin & mask) | (int3 & (~mask));
ptrace(PTRACE_POKETEXT, _process, addr, int3_data);
_breakPoints.emplace(bp.addr, bp);
}
void DisableBreakPoint(uint64_t addr)
{
if(!_breakPoints.contains(addr)) return;
_breakPoints[addr].enable = false;
uint64_t origin = ptrace(PTRACE_PEEKTEXT, _process, addr, NULL);
uint64_t mask = 0xFFFFFFFFFFFFFFFF << _breakPoints[addr].size * 8;
ptrace(PTRACE_POKETEXT, _process, addr,
(_breakPoints[addr].origin & (~mask)) | (origin & mask));
}
void RestoreBreakPoint(uint64_t addr)
{
if(!_breakPoints.contains(addr)) return;
_breakPoints[addr].enable = true;
uint64_t origin = ptrace(PTRACE_PEEKTEXT, _process, addr, NULL);
uint64_t mask = 0xFFFFFFFFFFFFFFFF << _breakPoints[addr].size * 8;
uint64_t int3_data = (origin & mask) | (int3 & (~mask));
ptrace(PTRACE_POKETEXT, _process, addr, int3_data);
}
void DeleteBreakPoint(uint64_t addr)
{
if(!_breakPoints.contains(addr)) return;
DisableBreakPoint(addr);
_breakPoints.erase(addr);
}
bool ContainsBreakPoint(uint64_t addr)
{
return _breakPoints.contains(addr);
}
std::vector<BreakPoint> GetBreakpoints()
{
std::vector<BreakPoint> r;
for(const auto &k : _breakPoints)
{
r.emplace_back(k.second);
}
return r;
}
void TryContinue()
{
if(_needToRestore == 0)
ptrace(PTRACE_CONT, _process, NULL, NULL);
else
{
ptrace(PTRACE_SINGLESTEP, _process, NULL, NULL);
_temporaryStop = true;
}
}
void queueMessage(char id, void* param) const
{
DebugCommand msg{id, param};
if(pipe != -1)
{
write(remotePipe, &msg, sizeof(DebugCommand));
}
}
static bool ContainerContains(const std::vector<std::string>& c, const std::string& e)
{
for(const auto &k : c)
{
if(k == e) return true;
}
return false;
}
/// disassembly from an address
/// \param address
/// \param cc
/// \param sz cc and sz cannot be both 0 at the same time
/// \return
[[nodiscard]] std::vector<cs_insn> disassemblyFrom(uint64_t address, int cc, uint32_t sz, const std::vector<std::string>& end = {}, bool make = false)
{
if(cc == 0 && sz == 0) return {};
uint64_t originAddress = address;
csh handle;
cs_insn *insn;
size_t count;
std::vector<cs_insn> r;
uint64_t data[4];
if(!cc) cc = INT_MAX;
if(!sz) sz = 0xFFFFFFFF;
if (cs_open(CS_ARCH_X86, CS_MODE_64, &handle) != CS_ERR_OK)
return {};
cs_option(handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
for(int i=0, p=0;i<cc && p < sz;i++)
{
PeekTextsFrom(data, 4, address);
for(auto k: _breakPoints) // Repair Breakpoint code
{
if(k.second.enable && k.second.addr == address)
{
uint64_t mask = 0xFFFFFFFFFFFFFFFF << k.second.size * 8;
data[0] = (k.second.origin & (~mask)) | ((data[0]) & mask);
}
}
count = cs_disasm(handle, (uint8_t*)data, 32, address, 1, &insn);
if(count == 1)
{
if((!r.empty()) && ContainerContains(end, insn[0].mnemonic)) {
cs_free(insn, count);
break;
}
cs_insn k{};
memcpy(&k, &insn[0], sizeof(cs_insn));
r.emplace_back(k);
address += k.size;
p += k.size;
cs_free(insn, count);
}else break;
}
cs_close(&handle);
if(make) // Save to static symbols
{
for(int i=0;i<staticSymbols.size();i++)
{
if(originAddress >= staticSymbols[i].address && originAddress < staticSymbols[i].address + staticSymbols[i].size)
{
staticSymbols.erase(staticSymbols.begin() + i);
i--;
}
}
Symbol sym{};
sym.address = originAddress;
sym.base = 0;
sprintf(sym.name, "call_%lx", sym.address);
for(const auto &k : r)
{
sym.size += k.size;
}
staticSymbols.emplace_back(sym);
}
return std::move(r);
}
bool GetMapEntire(uint64_t addr, MapEntire& ent)
{
for(int i=0;i<_map->Size();i++) // Read Text Data
{
auto item = _map->GetItem(i);
if(item.startAddress == addr) {
ent = item;
return true;
}
}
return false;
}
private:
bool entryBreak = true;
int _process = -1;
pthread_t _th = 0;
std::string _path;
std::string _argv;
std::string _module;
std::shared_ptr<MemoryMap> _map = nullptr;
bool _temporaryStop = false;
bool _trapped = false;
void sendMessage(char id, void* param) const {
DebugCommand msg{id, param};
if (pipe != -1) {
write(pipe, &msg, sizeof(DebugCommand));
}
}
void debugHandler()
{
char str_buffer[128];
std::vector<MapEntire> me;
int fk = fork();
if(fk == 0)
{
if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1) {
perror("ptrace");
exit(1);
}
char env[255];
strcpy(env, _path.c_str());
env[_path.rfind('/') + 1] = 0;
chdir(env);
execl(_path.c_str(), _argv.c_str(), NULL);
perror("execve");
exit(1);
}
_process = fk;
sprintf(str_buffer, "%s - [/proc/%d/]", _argv.c_str(), _process);
sendMessage(MSG_TITLE, str_buffer);
int status = 0;
long err;
char buffer[32];
_ep = epoll_create1(0);
auto ev1 = epoll_event{.events = EPOLLIN};
ev1.data.fd = pipe;
epoll_ctl(_ep, EPOLL_CTL_ADD, pipe, &ev1);
sendMessage(MSG_STARTUP, nullptr); // Notify Main Thread
while(true)
{
// Handle User IO Message
int n = epoll_wait(_ep, &ev1, 1, 1);
if(n > 0)
{
auto sz = read(pipe, buffer, sizeof(DebugCommand));
if(sz != sizeof(DebugCommand)) continue;
auto msg = (DebugCommand*)buffer;
switch (msg->id) {
case MSG_PAUSE:
kill(_process, SIGTRAP);
break;
case MSG_STOP:
kill(_process, SIGKILL);
sendMessage(MSG_STOP, nullptr);
return;
case MSG_RESTART:
kill(_process, SIGKILL);
sendMessage(MSG_RESTART, nullptr);
return;
case MSG_CONTINUE:
if(_trapped) {
TryContinue();
if(err == -1) perror("ptrace");
sendMessage(MSG_CONTINUE, nullptr);
_trapped = false;
}
break;
case MSG_STEPINTO:
if(_trapped) {
err = ptrace(PTRACE_SINGLESTEP, _process, NULL, NULL);
sendMessage(MSG_CONTINUE, nullptr);
_trapped = false;
break;
}
case MSG_STEPOVER:
{
auto ins = disassemblyFrom(_lastRip, 2, 0);
if(ins.size() < 2 || !std::string(ins[0].mnemonic).contains("call")){
err = ptrace(PTRACE_SINGLESTEP, _process, NULL, NULL);
sendMessage(MSG_CONTINUE, nullptr);
_trapped = false;
break;
}
if(!_breakPoints.contains(ins[1].address))
InsertBreakPoint(ins[1].address, true);
TryContinue();
sendMessage(MSG_CONTINUE, nullptr);
_trapped = false;
break;
}
case MSG_SWITCHSYMBOL:
{
auto b = reinterpret_cast<Symbol*>(msg->param);
auto ci = disassemblyFrom(b->base + b->address, 0, b->size);
auto ch = new std::vector<cs_insn>;
*ch = ci;
strcpy(currentSymbol.name, b->name);
currentSymbol.address = b->address;
currentSymbol.size = b->size;
currentSymbol.base = b->base;
// currentSymbol
sendMessage(MSG_ASM, ch);
sendMessage(MSG_CURRENTSYMBOL, nullptr);
sendMessage(MSG_SELECT, nullptr);
break;
}
case MSG_PARSE:
{
for(int i=0;i<_map->Size();i++) // Read Text Data
{
auto item = _map->GetItem(i);
me.emplace_back(item);
if(_lastRip >= item.startAddress && _lastRip < item.endAddress)
{
auto moduleBase = GetBaseAddress(_module);
auto ci = disassemblyFrom(_lastRip, 10000, item.endAddress - _lastRip, {"int3", "endbr64"}, true);
if(ci.empty()) break;
auto ch = new std::vector<cs_insn>;
*ch = ci;
sendMessage(MSG_ASM, ch);
sprintf(str_buffer, "%s - [/proc/%d/] - [%s] at %lx",
_argv.c_str(), _process, _module.c_str(), moduleBase);
sprintf(currentSymbol.name, "call_%lx", _lastRip);
currentSymbol.address = _lastRip;
currentSymbol.size = item.endAddress - _lastRip;
currentSymbol.base = moduleBase;
symbols = GetSymbols(_module);
sendMessage(MSG_INSYM, nullptr);
sendMessage(MSG_TITLE, str_buffer);
sendMessage(MSG_SELECT, nullptr);
sendMessage(MSG_CURRENTSYMBOL, nullptr);
sendMessage(MSG_SYMBOLS, nullptr);
}
}
break;
}
case MSG_BREAK:
{
auto addr = (uint64_t)msg->param;
InsertBreakPoint(addr, false);
break;
}
case MSG_BREAKONCE:
{
auto addr = (uint64_t)msg->param;
InsertBreakPoint(addr, true);
break;
}
case MSG_DELBREAK:
{
auto addr = (uint64_t)msg->param;
DeleteBreakPoint(addr);
break;
}
case MSG_SWITCHMODULE:
{
_module = (char*)msg->param;
auto moduleBase = GetBaseAddress(_module);
symbols = GetSymbols(_module);
if(symbols.empty()) break;
currentSymbol = symbols[0];
sprintf(str_buffer, "%s - [/proc/%d/] - [%s] at %lx", _argv.c_str(), _process, _module.c_str(), moduleBase);
auto ci = disassemblyFrom(moduleBase + currentSymbol.address, 0, currentSymbol.size);
auto ch = new std::vector<cs_insn>;
*ch = ci;
sendMessage(MSG_ASM, ch);
sendMessage(MSG_TITLE, str_buffer);
sendMessage(MSG_SYMBOLS, nullptr);
sendMessage(MSG_CURRENTSYMBOL, nullptr);
sendMessage(MSG_SELECT, nullptr);
delete[](char*)msg->param;
break;
}
case MSG_GETBREAKS:
{
auto dst = new cs_insn[_breakPoints.size()];
int p = 0;
for(const auto &k : GetBreakpoints())
{
auto ins = disassemblyFrom(k.addr, 1, 0);
dst[p++] = ins[0];
}
sendMessage(MSG_GETBREAKS, dst);
break;
}
case MSG_CALLSTACK:
{
GetCallStack();
break;
}
default:
break;
}
}
// Handle Debug Process Signal
auto r = waitpid(_process, &status, WNOHANG);
if(r == 0) continue;
if(WIFEXITED(status) || WIFSIGNALED(status)) break;
int signal_number = WSTOPSIG(status);
switch (signal_number) {
case SIGTRAP: {
_trapped = true;
_map = std::make_shared<MemoryMap>(_process);
regs = {};
me.clear();
ptrace(PTRACE_GETREGS, _process, NULL, &regs);
if(entryBreak) // If this is the first time enter trap, insert int3 break point to Entry Point
{
entryBreak = false;
_trapped = false;
auto base = GetBaseAddress();
uint64_t entryPoint = base + GetEntryPoint();
InsertBreakPoint(entryPoint);
ptrace(PTRACE_CONT, _process, NULL, NULL);
break;
}
bool couldBeBp = true;
if(_needToRestore != 0)
{
RestoreBreakPoint(_needToRestore);
_needToRestore = 0;
couldBeBp = false;
}
if(_temporaryStop){
_trapped = false;
_temporaryStop = false;
ptrace(PTRACE_CONT, _process, NULL, NULL);
break;
}
if(_breakPoints.contains(regs.rip - 1) && couldBeBp)
{
// Reduce RIP by 1
regs.rip -= 1;
ptrace(PTRACE_SETREGS, _process, NULL, &regs);
// Restore origin data
if(_breakPoints[regs.rip].once)
DeleteBreakPoint(regs.rip);
else
{
DisableBreakPoint(regs.rip);
_needToRestore = regs.rip;
}
}
_lastRip = regs.rip;
bool updateModule = false;
bool ridSymbols = true;
for(int i=0;i<_map->Size();i++) // Read Text Data
{
auto item = _map->GetItem(i);
me.emplace_back(item);
if(regs.rip >= item.startAddress && regs.rip < item.endAddress)
{
if(_module != item.path) updateModule = true;
_module = item.path;
auto moduleBase = GetBaseAddress(_module);
symbols = GetSymbols(_module);
for(auto b : symbols)
{
// If Rip is between the start and the end of a module
if(regs.rip >= b.base + b.address && regs.rip < b.base + b.address + b.size)
{
ridSymbols = false;
if (currentSymbol.address == b.address) break;
currentSymbol = b;
auto ci = disassemblyFrom(moduleBase + b.address, 0, b.size);
auto ch = new std::vector<cs_insn>;
*ch = ci;
sendMessage(MSG_ASM, ch);
sendMessage(MSG_CURRENTSYMBOL, nullptr);
}
}
if(ridSymbols) { // ridSymbols keeps true means RIP isn't in any Symbol
sprintf(str_buffer, "%s - [/proc/%d/] - [%s] at %lx (!Symbol table Escaping!)",
_argv.c_str(), _process, _module.c_str(), moduleBase);
sendMessage(MSG_NONSYM, nullptr);
strcpy(currentSymbol.name, "[Out of Symbol Table]");
currentSymbol.address = _lastRip;
currentSymbol.size = item.endAddress - _lastRip;
currentSymbol.base = moduleBase;
sendMessage(MSG_CURRENTSYMBOL, nullptr);
}
else{
sprintf(str_buffer, "%s - [/proc/%d/] - [%s] at %lx", _argv.c_str(), _process, _module.c_str(), moduleBase);
sendMessage(MSG_INSYM, nullptr);
}
sendMessage(MSG_TITLE, str_buffer);
}
}
sendMessage(MSG_PAUSE, nullptr);
sendMessage(MSG_REG, &regs);
sendMessage(MSG_MEMORY, &me);
if(updateModule) sendMessage(MSG_SYMBOLS, nullptr);
sendMessage(MSG_SELECT, nullptr);
break;
}
case SIGTERM:
kill(_process, SIGKILL);
waitpid(_process, &status, 0);
_process = -1;
sendMessage(MSG_STOP, nullptr);
return;
default:
break;
}
}
sendMessage(MSG_STOP, nullptr);
}
public:
explicit Core(const std::string& f, const std::string& a)
{
_path = f;
_argv = a;
auto lambda = [](void *arg) {
Core* instance = static_cast<Core*>(arg);
instance->debugHandler();
return (void*)nullptr;
};
pthread_create(&_th, nullptr, lambda, this);
}
~Core()
{
if(_process > 0)
{
pthread_join(_th, nullptr);
// delete[] codeData;
close(_ep);
}
}
bool Status() const
{
return _trapped;
}
std::optional<Symbol> GetSymbolAt(uint64_t address, std::string &mod)
{
auto _m = _map->GetModules();
for(const auto &k : _m)
{
if(address >= k.startAddress && address < k.endAddress)
{
mod = k.path;
for(const auto &l : GetSymbols(k.path))
{
if(address >= l.address + l.base && address < l.address + l.size + l.base)
{
return l;
}
}
}
}
return std::nullopt;
}
void GetCallStack()
{
std::vector<std::pair<uint64_t, uint64_t>> callPoints;
auto r = new std::stack<CallstackStruct>;
uint64_t cbp = regs.rbp;
callPoints.emplace_back(regs.rip, cbp);
while(cbp)
{
callPoints.emplace_back(ptrace(PTRACE_PEEKDATA, _process, cbp + 8, NULL), ptrace(PTRACE_PEEKDATA, _process, cbp, NULL));
cbp = ptrace(PTRACE_PEEKDATA, _process, cbp, NULL);
}
int cc = 0;
for(const auto &k : callPoints)
{
std::string mod;
auto s = GetSymbolAt(k.first, mod);
Symbol s2{};
strcpy(s2.name, "<???>");
if(s.has_value()) s2 = s.value();
CallstackStruct e{};
e.callPoint = k.first;
sprintf(e.module, "<%s>", mod.empty() ? "???" : mod.c_str());
e.symbol = s2;
e.stackBase = k.second;
e.depth = cc++;
r->emplace(e);
}
CallstackStruct e{};
e.depth = _process;
r->emplace(e);
sendMessage(MSG_CALLSTACK, r);
}
};
#endif

133
core/MemoryMap.hpp Normal file
View File

@@ -0,0 +1,133 @@
#include <string>
#ifndef _H_MEMORYMAP
#define _H_MEMORYMAP 1
static std::vector<std::string> split(const std::string& str, char delimiter) {
std::vector<std::string> tokens;
std::string token;
std::stringstream ss(str);
while (std::getline(ss, token, delimiter)) {
tokens.push_back(token);
}
return tokens;
}
enum Access{
READ = 0x01,
WRITE = 0x02,
EXECUTE = 0x04,
PRIVATE = 0x08,
SHARED = 0x10
};
struct MapEntire
{
uint64_t startAddress;
uint64_t endAddress;
uint8_t access = 0;
uint32_t offset;
char path[512] = {0};
MapEntire()
{
startAddress = 0;
endAddress = 0;
offset = 0;
}
explicit MapEntire(const std::string& src)
{
auto e = split(src, ' ');
for(int i=0;i<e.size();i++)
if(e[i].empty())
{
e.erase(e.begin() + i);
i--;
continue;
}
startAddress = std::stoull(split(e[0], '-')[0], nullptr, 16);
endAddress = std::stoull(split(e[0], '-')[1], nullptr, 16);
if(e[1].contains("r")) access |= READ;
if(e[1].contains("w")) access |= WRITE;
if(e[1].contains("x")) access |= EXECUTE;
if(e[1].contains("p")) access |= PRIVATE;
if(e[1].contains("s")) access |= SHARED;
offset = std::stoull(e[2], nullptr, 16);
if(e.size() < 6) return;
e[5].erase(e[5].end() - 1);
strcpy(path, e[5].c_str());
}
};
class MemoryMap
{
protected:
static bool readAll(std::vector<std::string>& dst, const std::string& path)
{
auto f = fopen(path.c_str(), "r");
if(!f){ perror("fopen()"); return false; }
dst.clear();
char line[1024];
while(fgets(line, 1024, f))
{
dst.emplace_back(line);
}
fclose(f);
return true;
}
private:
char _path[255] = {0};
std::vector<std::string> _content;
public:
explicit MemoryMap(int pid)
{
sprintf(_path, "/proc/%d/maps", pid);
readAll(_content, _path);
}
MapEntire GetItem(int index)
{
auto u = MapEntire(_content[index]);
return u;
}
size_t Size()
{
return _content.size();
}
std::vector<MapEntire> GetModules()
{
std::vector<MapEntire> r;
for(int i=0;i<Size();i++)
{
auto k = GetItem(i);
if(!std::ranges::any_of(r, [&](const MapEntire& i){
return strcmp(k.path, i.path) == 0;
}) && k.path[0] && k.path[0] != '[' )
{
r.emplace_back(k);
}
if(strcmp(k.path, (*(r.end() - 1)).path) == 0)
{
(*(r.end() - 1)).endAddress = k.endAddress;
}
}
return r;
}
};
#endif

View File

@@ -1,26 +0,0 @@
//
// Created by acite on 5/1/24.
//
#include <gtkmm.h>
using namespace Gtk;
extern Button* bAttach;
extern Dialog* dialogAttach;
extern Window* MainWindow;
void button_attach()
{
dialogAttach->show();
}
void button_exec()
{
int fk = fork();
if(fk == 0)
{
execl("/usr/bin/netstat", "netstat" ,"-tupln", NULL);
return;
}
}

View File

@@ -1,4 +0,0 @@
//
// Created by acite on 5/1/24.
//

View File

@@ -1,39 +0,0 @@
//
// Created by acite on 5/1/24.
//
#include "cpu.h"
using namespace std;
using namespace Gtk;
extern TreeView* codeView;
extern Glib::RefPtr<ListStore> codeViewStore;
void add_row(const string& addr,
const string& data,
const string& dasm,
const string& sts
){
auto mm = codeViewStore->append();
Gtk::TreeModel::Row row = *mm;
row.set_value(0, addr);
row.set_value(1, data);
row.set_value(2, dasm);
row.set_value(3, sts);
}
void set_row_status(uint64_t index_addr, const string& sts)
{
string addr;
for(auto i : codeViewStore->children())
{
i.get_value(0, addr);
if(to_string(index_addr) == addr)
{
i.set_value(3, sts);
break;
}
}
}

View File

@@ -1,20 +0,0 @@
//
// Created by acite on 5/1/24.
//
#ifndef ALDBG_CPU_H
#define ALDBG_CPU_H
#include <gtkmm.h>
#include <iostream>
#include <string>
void add_row(const std::string &addr,
const std::string &data,
const std::string &dasm,
const std::string &sts
);
void set_row_status(uint64_t index_addr, const std::string& sts);
#endif //ALDBG_CPU_H

View File

@@ -0,0 +1,272 @@
#include <gtkmm.h>
namespace
{
class CallstackItem
{
public:
CallstackItem() = default;
CallstackItem(Glib::ustring callPoint, Glib::ustring stackBase, Glib::ustring symbol, Glib::ustring module, Glib::ustring depth);
CallstackItem(Glib::ustring callPoint, const std::vector<CallstackItem>& children);
CallstackItem(const CallstackItem& src) = default;
CallstackItem(CallstackItem&& src) noexcept = default;
CallstackItem& operator=(const CallstackItem& src) = default;
CallstackItem& operator=(CallstackItem&& src) noexcept = default;
~CallstackItem() = default;
Glib::ustring callPoint;
Glib::ustring stackBase;
Glib::ustring symbol;
Glib::ustring module;
Glib::ustring depth;
std::vector<CallstackItem> m_children;
}; // CallstackItem
CallstackItem::CallstackItem(Glib::ustring callPoint, Glib::ustring stackBase, Glib::ustring symbol, Glib::ustring module, Glib::ustring depth)
: callPoint(std::move(callPoint)), stackBase(std::move(stackBase)), symbol(std::move(symbol)), module(std::move(module)), depth(std::move(depth))
{ }
CallstackItem::CallstackItem(Glib::ustring callPoint,
const std::vector<CallstackItem>& children)
: callPoint(std::move(callPoint)), m_children(children)
{ }
}
class CallstackView : public Gtk::ColumnView
{
protected:
class ModelColumns : public Glib::Object
{
public:
std::vector<CallstackItem> m_children;
Glib::ustring callPoint;
Glib::ustring stackBase;
Glib::ustring symbol;
Glib::ustring module;
Glib::ustring depth;
static Glib::RefPtr<ModelColumns> create(const CallstackItem& item)
{
return Glib::make_refptr_for_instance<ModelColumns>(new ModelColumns(item));
}
protected:
explicit ModelColumns(const CallstackItem& item)
: m_children(item.m_children), callPoint(item.callPoint),
stackBase(item.stackBase), symbol(item.symbol),
module(item.module), depth(item.depth)
{ }
}; // ModelColumns
protected:
static Glib::RefPtr<Gio::ListModel> create_model(
const Glib::RefPtr<Glib::ObjectBase>& item)
{
auto col = std::dynamic_pointer_cast<ModelColumns>(item);
if (col && col->m_children.empty())
return {};
auto result = Gio::ListStore<ModelColumns>::create();
const std::vector<CallstackItem>& children = col ? col->m_children : std::vector<CallstackItem>();
for (const auto& child : children)
result->append(ModelColumns::create(child));
return result;
}
Glib::RefPtr<Gtk::TreeListModel> m_TreeListModel;
Glib::RefPtr<Gtk::MultiSelection> m_TreeSelection;
Glib::RefPtr<Gio::ListStore<ModelColumns>> _store;
public:
void append_group(const std::string &name, const std::vector<CallstackItem> &g)
{
CallstackItem k(name, g);
if(_store) _store->append(ModelColumns::create(k));
}
void clear()
{
_store->remove_all();
}
CallstackView (BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::ColumnView(cobject)
{
auto root = create_model({});
m_TreeListModel = Gtk::TreeListModel::create(root,
sigc::ptr_fun(&CallstackView::create_model), false, true);
m_TreeSelection = Gtk::MultiSelection::create(m_TreeListModel);
set_model(m_TreeSelection);
{
auto factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CallstackView::on_setup_keylabel));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CallstackView::on_bind_callPoint));
auto column = Gtk::ColumnViewColumn::create("Call Point", factory);
column->set_fixed_width(200);
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CallstackView::on_setup_label));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CallstackView::on_bind_stackBase));
column = Gtk::ColumnViewColumn::create("Stack Base", factory);
column->set_expand();
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CallstackView::on_setup_label));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CallstackView::on_bind_symbol));
column = Gtk::ColumnViewColumn::create("Symbol", factory);
column->set_expand();
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CallstackView::on_setup_label));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CallstackView::on_bind_module));
column = Gtk::ColumnViewColumn::create("Module", factory);
column->set_expand();
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CallstackView::on_setup_label));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CallstackView::on_bind_depth));
column = Gtk::ColumnViewColumn::create("Depth", factory);
column->set_expand();
append_column(column);
}
_store = std::dynamic_pointer_cast<Gio::ListStore<ModelColumns>>(root);
}
void on_setup_keylabel(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
// Each ListItem contains a TreeExpander, which contains a Label.
// The Label shows the ModelColumns::m_holiday_name. That's done in on_bind_holiday().
auto expander = Gtk::make_managed<Gtk::TreeExpander>();
auto label = Gtk::make_managed<Gtk::Label>();
label->set_halign(Gtk::Align::START);
expander->set_child(*label);
list_item->set_child(*expander);
}
void on_setup_label(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
// Each ListItem contains a TreeExpander, which contains a Label.
// The Label shows the ModelColumns::m_holiday_name. That's done in on_bind_holiday().
auto label = Gtk::make_managed<Gtk::Label>();
label->set_halign(Gtk::Align::START);
list_item->set_child(*label);
}
void on_bind_callPoint(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto row = std::dynamic_pointer_cast<Gtk::TreeListRow>(list_item->get_item());
if (!row)
return;
auto col = std::dynamic_pointer_cast<ModelColumns>(row->get_item());
if (!col)
return;
auto expander = dynamic_cast<Gtk::TreeExpander*>(list_item->get_child());
if (!expander)
return;
expander->set_list_row(row);
auto label = dynamic_cast<Gtk::Label*>(expander->get_child());
if (!label)
return;
label->set_text(col->callPoint);
}
void on_bind_stackBase(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto row = std::dynamic_pointer_cast<Gtk::TreeListRow>(list_item->get_item());
if (!row)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_visible(!row->is_expandable());
if (row->is_expandable())
return;
auto col = std::dynamic_pointer_cast<ModelColumns>(row->get_item());
if (!col)
return;
label->set_text(col->stackBase);
}
void on_bind_symbol(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto row = std::dynamic_pointer_cast<Gtk::TreeListRow>(list_item->get_item());
if (!row)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_visible(!row->is_expandable());
if (row->is_expandable())
return;
auto col = std::dynamic_pointer_cast<ModelColumns>(row->get_item());
if (!col)
return;
label->set_text(col->symbol);
}
void on_bind_module(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto row = std::dynamic_pointer_cast<Gtk::TreeListRow>(list_item->get_item());
if (!row)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_visible(!row->is_expandable());
if (row->is_expandable())
return;
auto col = std::dynamic_pointer_cast<ModelColumns>(row->get_item());
if (!col)
return;
label->set_text(col->module);
}
void on_bind_depth(
const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto row = std::dynamic_pointer_cast<Gtk::TreeListRow>(list_item->get_item());
if (!row)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_visible(!row->is_expandable());
if (row->is_expandable())
return;
auto col = std::dynamic_pointer_cast<ModelColumns>(row->get_item());
if (!col)
return;
label->set_text(col->depth);
}
};

358
interface/cpu/CPUView.hpp Normal file
View File

@@ -0,0 +1,358 @@
//
// Created by acite on 5/1/24.
//
#include <gtkmm.h>
#include <capstone/capstone.h>
#include "../../core/Core.hpp"
namespace {
class CPUModelColumns : public Glib::Object {
public:
Glib::PropertyProxy<bool> propertyBroke() { return _broke.get_proxy(); }
Glib::PropertyProxy<std::vector<std::string>> propertyClasses() { return _classes.get_proxy(); }
Glib::ustring Address;
Glib::ustring Data;
Glib::ustring Disassembly;
Glib::RefPtr<Glib::Binding> BindingToCheckbutton = nullptr;
Glib::RefPtr<Glib::Binding> BindingToAddress = nullptr;
Glib::RefPtr<Glib::Binding> BindingToData = nullptr;
Glib::RefPtr<Glib::Binding> BindingToDisassembly = nullptr;
std::shared_ptr<Core> core = nullptr;
static Glib::RefPtr<CPUModelColumns> create(bool broke, const Glib::ustring &address,
const Glib::ustring &data, const Glib::ustring &disassembly, std::shared_ptr<Core> _core){
return Glib::make_refptr_for_instance<CPUModelColumns>(
new CPUModelColumns(broke, address, data, disassembly, std::move(_core)));
}
protected:
CPUModelColumns(bool broke, Glib::ustring address,
Glib::ustring data, Glib::ustring disassembly, std::shared_ptr<Core> _core)
: Glib::ObjectBase(typeid(CPUModelColumns)),
Address(std::move(address)), Data(std::move(data)), Disassembly(std::move(disassembly)),
_broke(*this, "broke", broke),
_classes(*this, "highlighted", {}), core(std::move(_core)){
propertyBroke().signal_changed().connect(
sigc::mem_fun(*this, &CPUModelColumns::on_fixed_changed));
}
Glib::Property<bool> _broke;
Glib::Property<std::vector<std::string>> _classes;
void on_fixed_changed() {
if(propertyBroke().get_value())
{
core->queueMessage(MSG_BREAK, (void*)std::stoull(Address, nullptr, 16));
}
else
{
core->queueMessage(MSG_DELBREAK, (void*)std::stoull(Address, nullptr, 16));
}
}
};
}
class CPUView : public Gtk::ColumnView
{
public:
uint64_t rip = 0;
int _lastSelectedRow = -1;
std::shared_ptr<Core> core = nullptr;
protected:
Glib::RefPtr<Gio::ListStore<CPUModelColumns>> _codeViewStore;
Glib::RefPtr<Gtk::SingleSelection> _model;
[[nodiscard]]static std::vector<cs_insn> disassembly(uint8_t* data, int cc, size_t size, int address)
{
std::vector<cs_insn> r;
csh handle;
cs_insn *insn;
size_t count;
if (cs_open(CS_ARCH_X86, CS_MODE_64, &handle) != CS_ERR_OK)
return {};
cs_option(handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
for(int i=0, sz = 0;i<cc && sz < size;i++)
{
count = cs_disasm(handle, (uint8_t*)data, 32, address, 1, &insn);
if(count == 1)
{
cs_insn k{};
memcpy(&k, &insn[0], sizeof(cs_insn));
r.emplace_back(k);
address += k.size;
data += k.size;
sz += k.size;
}else break;
}
cs_free(insn, count);
cs_close(&handle);
return std::move(r);
}
public:
CPUView(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::ColumnView(cobject)
{
_codeViewStore = Gio::ListStore<CPUModelColumns>::create();
_model = Gtk::SingleSelection::create(_codeViewStore);
_model->set_autoselect(false);
_model->set_can_unselect(true);
set_model(_model);
set_reorderable(false);
set_hexpand();
set_vexpand();
add_cols();
signal_activate().connect([this](guint i){
auto row = _codeViewStore->get_item(i);
bool old = row->propertyBroke().get_value();
row->propertyBroke().set_value(!old);
});
}
void setData(const std::vector<cs_insn>& insn)
{
_lastSelectedRow = -1;
clear();
for (const auto &k : insn) {
char cmdAddr[32], insByte[32];
std::string bytes, cmdStr;
for(int j = 0;j<k.size;j++)
{
sprintf(insByte, "%2x", k.bytes[j]);
bytes += insByte;
}
sprintf(cmdAddr, "%16lx", k.address);
cmdStr = k.mnemonic;
cmdStr += " ";
cmdStr += k.op_str;
add_row(cmdAddr, bytes, cmdStr, core->ContainsBreakPoint(k.address));
}
}
void add_row(const std::string& addr,
const std::string& data,
const std::string& disassembly,
bool isBroke
){
_codeViewStore->append(CPUModelColumns::create(isBroke, addr, data, disassembly, core));
}
void clear()
{
_codeViewStore->remove_all();
}
uint64_t GetSelected()
{
auto i = _model->get_selected();
if(i == GTK_INVALID_LIST_POSITION) return 0;
auto k = _codeViewStore->get_item(i);
return std::stoull(k->Address, nullptr, 16);
}
void Select()
{
for (int i=0;i<_codeViewStore->get_n_items();i++) {
auto row = _codeViewStore->get_item(i);
std::string str = row->Address;
if (std::stoull(str, nullptr, 16) == rip) {
if(_lastSelectedRow >= 0)
_codeViewStore->get_item(_lastSelectedRow)->propertyClasses().set_value({});
_lastSelectedRow = i;
row->propertyClasses().set_value({"highlight"});
_model->select_item(i, true);
gtk_column_view_scroll_to(this->gobj(), i, nullptr, GTK_LIST_SCROLL_NONE, nullptr);
break;
}
}
queue_draw();
}
void add_cols()
{
/* column for fixed toggles */
auto factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(
sigc::mem_fun(*this, &CPUView::onSetupCheckbutton));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CPUView::onBindBroke));
factory->signal_unbind().connect(
sigc::mem_fun(*this, &CPUView::onUnbindBroke));
auto column = Gtk::ColumnViewColumn::create("Broke", factory);
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(sigc::bind(sigc::mem_fun(*this,
&CPUView::onSetupLabel), Gtk::Align::START));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CPUView::onBindAddress));
factory->signal_unbind().connect(
sigc::mem_fun(*this, &CPUView::onUnbindAddress));
column = Gtk::ColumnViewColumn::create("Address", factory);
column->set_fixed_width(150);
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(sigc::bind(sigc::mem_fun(*this,
&CPUView::onSetupLabel), Gtk::Align::START));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CPUView::onBindData));
factory->signal_unbind().connect(
sigc::mem_fun(*this, &CPUView::onUnbindData));
column = Gtk::ColumnViewColumn::create("Data", factory);
append_column(column);
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(sigc::bind(sigc::mem_fun(*this,
&CPUView::onSetupLabel), Gtk::Align::START));
factory->signal_bind().connect(
sigc::mem_fun(*this, &CPUView::onBindDisassembly));
factory->signal_unbind().connect(
sigc::mem_fun(*this, &CPUView::onUnbindDisassembly));
column = Gtk::ColumnViewColumn::create("Disassembly", factory);
column->set_expand();
append_column(column);
}
void onSetupCheckbutton(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto checkbutton = Gtk::make_managed<Gtk::CheckButton>();
checkbutton->set_halign(Gtk::Align::CENTER);
checkbutton->set_valign(Gtk::Align::CENTER);
list_item->set_child(*checkbutton);
}
void onSetupLabel(
const Glib::RefPtr<Gtk::ListItem>& list_item, Gtk::Align halign)
{
auto label = Gtk::make_managed<Gtk::Label>("", halign);
list_item->set_child(*label);
}
void onBindBroke(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
auto checkbutton = dynamic_cast<Gtk::CheckButton*>(list_item->get_child());
if (!checkbutton)
return;
checkbutton->set_active(col->propertyBroke());
if (col->BindingToCheckbutton)
col->BindingToCheckbutton->unbind();
col->BindingToCheckbutton = Glib::Binding::bind_property(
checkbutton->property_active(), col->propertyBroke(),
Glib::Binding::Flags::BIDIRECTIONAL);
}
void onUnbindBroke(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
if (col->BindingToCheckbutton)
col->BindingToCheckbutton->unbind();
col->BindingToCheckbutton.reset();
}
void onBindAddress(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
std::string tx = label->get_text();
label->set_text(col->Address);
if (col->BindingToAddress)
col->BindingToAddress->unbind();
col->BindingToAddress = Glib::Binding::bind_property(
label->property_css_classes(), col->propertyClasses(),
Glib::Binding::Flags::BIDIRECTIONAL);
}
void onUnbindAddress(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
if (col->BindingToAddress)
col->BindingToAddress->unbind();
col->BindingToAddress.reset();
}
void onBindData(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_text(col->Data + " ");
if (col->BindingToData)
col->BindingToData->unbind();
col->BindingToData = Glib::Binding::bind_property(
label->property_css_classes(), col->propertyClasses(),
Glib::Binding::Flags::BIDIRECTIONAL);
}
void onUnbindData(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
if (col->BindingToData)
col->BindingToData->unbind();
col->BindingToData.reset();
}
void onBindDisassembly(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
label->set_text(col->Disassembly);
if (col->BindingToDisassembly)
col->BindingToDisassembly->unbind();
col->BindingToDisassembly = Glib::Binding::bind_property(
label->property_css_classes(), col->propertyClasses(),
Glib::Binding::Flags::BIDIRECTIONAL);
}
void onUnbindDisassembly(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<CPUModelColumns>(list_item->get_item());
if (!col)
return;
if (col->BindingToDisassembly)
col->BindingToDisassembly->unbind();
col->BindingToDisassembly.reset();
}
};

32
interface/cpu/RegView.hpp Normal file
View File

@@ -0,0 +1,32 @@
#include <gtkmm.h>
class RegView : public Gtk::TreeView
{
private:
Glib::RefPtr<Gtk::ListStore> _regViewStore;
public:
RegView(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::TreeView(cobject),
_regViewStore(std::dynamic_pointer_cast<Gtk::ListStore>(get_model()))
{
}
void add_data(const std::string& reg, uint64_t value)
{
auto mm = _regViewStore->append();
Gtk::TreeModel::Row row = *mm;
char regv[64];
sprintf(regv, "%lX", value);
row.set_value(0, reg);
row.set_value(1, std::string(regv));
}
void clear()
{
_regViewStore->clear();
}
};

View File

@@ -0,0 +1,79 @@
#include <gtkmm.h>
class SymbolMenu;
class SelfContainedButton : public Gtk::Button
{
typedef void(*Action)(const std::string &, SymbolMenu* menu, const Symbol& sym);
public:
SelfContainedButton(SymbolMenu* menu, const Symbol& sym) : Gtk::Button(), _menu(menu), _sym(sym)
{
}
void SetAction(Action ac)
{
_action = ac;
signal_clicked().connect(sigc::mem_fun(*this, &SelfContainedButton::clicked));
}
private:
void clicked()
{
_action(get_label(), _menu, _sym);
}
Action _action = nullptr;
SymbolMenu* _menu = nullptr;
Symbol _sym;
};
class SymbolMenu : public Gtk::MenuButton
{
private:
void sendMessage(char id, void* param) const
{
DebugCommand msg{id, param};
if(port != -1)
{
write(port, &msg, sizeof(DebugCommand));
}
}
public:
Glib::RefPtr<Gtk::Box> popoverBox = nullptr;
std::vector<SelfContainedButton*> buttonList;
Glib::RefPtr<Gtk::Label> childLabel = nullptr;
int port = -1;
public:
SymbolMenu(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::MenuButton(cobject)
{
}
void UpdateList(const std::vector<Symbol> &list)
{
if(popoverBox)
{
for(const auto &k : buttonList)
{
popoverBox->remove(*k);
}
buttonList.clear();
for(const auto &k : list)
{
auto b = Gtk::make_managed<SelfContainedButton>(this, k);
b->set_label(k.name);
b->SetAction([](const std::string& label, SymbolMenu* menu, const Symbol& sym){
menu->sendMessage(MSG_SWITCHSYMBOL, (void*)&sym);
});
buttonList.push_back(b);
popoverBox->append(*b);
}
}
}
};

View File

@@ -0,0 +1,225 @@
#include <gtkmm.h>
#include <format>
#include <unordered_map>
std::unordered_map<uint32_t, int> allowedChar
{
{'0', 1},
{'1', 1},
{'2', 1},
{'3', 1},
{'4', 1},
{'5', 1},
{'6', 1},
{'7', 1},
{'8', 1},
{'9', 1},
{'0', 1},
{'a', 1},
{'b', 1},
{'c', 1},
{'d', 1},
{'e', 1},
{'f', 1},
{'A', 1},
{'B', 1},
{'C', 1},
{'D', 1},
{'E', 1},
{'F', 1},
};
class NoNewlineTextView : public Gtk::TextView {
public:
NoNewlineTextView() {
auto buffer = get_buffer();
buffer->signal_insert().connect(sigc::mem_fun(*this, &NoNewlineTextView::on_insert_text), false);
}
protected:
void on_insert_text(const Gtk::TextBuffer::iterator& pos, const Glib::ustring& text, int x) {
for(const auto &k : text)
{
if(!allowedChar[k] || get_buffer()->get_text().size() + text.size() > 2)
{
get_buffer()->signal_insert().emission_stop();
break;
}
}
}
void on_focus_out()
{
}
};
namespace {
class EditorModelColumns : public Glib::Object {
public:
Glib::ustring baseAddress;
Glib::RefPtr<Glib::Binding> bindingToValues[16];
Glib::PropertyProxy<Glib::ustring> propertyValues(int i) { return _values[i].get_proxy(); }
static Glib::RefPtr<EditorModelColumns> create(const Glib::ustring &baseAddress, uint8_t values[16]){
return Glib::make_refptr_for_instance<EditorModelColumns>(new EditorModelColumns(baseAddress, values));
}
protected:
Glib::Property<Glib::ustring> _values[16];
EditorModelColumns(Glib::ustring baseAddress, uint8_t values[16]) : Glib::ObjectBase(typeid(EditorModelColumns)), baseAddress(std::move(baseAddress)),_values{
Glib::Property<Glib::ustring> (*this, "i1", std::format("{:02x}", values[0])),
Glib::Property<Glib::ustring> (*this, "i2", std::format("{:02x}", values[1])),
Glib::Property<Glib::ustring> (*this, "i3", std::format("{:02x}", values[2])),
Glib::Property<Glib::ustring> (*this, "i4", std::format("{:02x}", values[3])),
Glib::Property<Glib::ustring> (*this, "i5", std::format("{:02x}", values[4])),
Glib::Property<Glib::ustring> (*this, "i6", std::format("{:02x}", values[5])),
Glib::Property<Glib::ustring> (*this, "i7", std::format("{:02x}", values[6])),
Glib::Property<Glib::ustring> (*this, "i8", std::format("{:02x}", values[7])),
Glib::Property<Glib::ustring> (*this, "i9", std::format("{:02x}", values[8])),
Glib::Property<Glib::ustring> (*this, "i10", std::format("{:02x}", values[9])),
Glib::Property<Glib::ustring> (*this, "i11", std::format("{:02x}", values[10])),
Glib::Property<Glib::ustring> (*this, "i12", std::format("{:02x}", values[11])),
Glib::Property<Glib::ustring> (*this, "i13", std::format("{:02x}", values[12])),
Glib::Property<Glib::ustring> (*this, "i14", std::format("{:02x}", values[13])),
Glib::Property<Glib::ustring> (*this, "i15", std::format("{:02x}", values[14])),
Glib::Property<Glib::ustring> (*this, "i16", std::format("{:02x}", values[15]))} { }
};
}
class EditorView : public Gtk::ColumnView {
private:
Glib::RefPtr<Gio::ListStore<EditorModelColumns>> _editorModel;
Glib::RefPtr<Gtk::SingleSelection> _model;
public:
EditorView(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::ColumnView(cobject)
{
_editorModel = Gio::ListStore<EditorModelColumns>::create();
_model = Gtk::SingleSelection::create(_editorModel);
_model->set_autoselect(false);
_model->set_can_unselect(true);
set_model(_model);
set_reorderable(false);
set_hexpand();
set_vexpand();
add_cols();
add_row("7fff7e");
add_row("7fff7f");
add_row("7fff71");
add_row("7fff72");
}
void add_cols()
{
auto factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(sigc::bind(sigc::mem_fun(*this,
&EditorView::onSetupLabel), Gtk::Align::START));
factory->signal_bind().connect(
sigc::mem_fun(*this, &EditorView::onBindBase));
auto column = Gtk::ColumnViewColumn::create("Base", factory);
column->set_fixed_width(150);
append_column(column);
for(int i=0;i<16;i++)
{
factory = Gtk::SignalListItemFactory::create();
factory->signal_setup().connect(sigc::bind(sigc::mem_fun(*this,
&EditorView::onSetupEditableLabel), i));
factory->signal_bind().connect(
sigc::bind(sigc::mem_fun(*this, &EditorView::onBindValue), i));
factory->signal_unbind().connect(
sigc::bind(sigc::mem_fun(*this, &EditorView::onUnbindValue), i));
column = Gtk::ColumnViewColumn::create(std::format("{:02x}", i) , factory);
column->set_expand();
append_column(column);
}
}
void add_row(const std::string& base
){
uint8_t db[16] = {0};
_editorModel->append(EditorModelColumns::create(base, db));
}
void onSetupLabel(
const Glib::RefPtr<Gtk::ListItem>& list_item, Gtk::Align halign)
{
auto label = Gtk::make_managed<Gtk::Label>("", halign);
list_item->set_child(*label);
}
void onBindBase(const Glib::RefPtr<Gtk::ListItem>& list_item)
{
auto col = std::dynamic_pointer_cast<EditorModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<Gtk::Label*>(list_item->get_child());
if (!label)
return;
std::string tx = label->get_text();
label->set_text(col->baseAddress);
}
void onSetupEditableLabel(
const Glib::RefPtr<Gtk::ListItem>& list_item, int i)
{
auto label = Gtk::make_managed<NoNewlineTextView>();
label->set_editable();
label->set_accepts_tab(false);
// label->signal_insert_text().connect([](const Glib::ustring& str, int* n){
//
// });
label->get_buffer()->property_text().signal_changed().connect(sigc::bind(sigc::mem_fun(
*this, &EditorView::on_edited), list_item, i));
list_item->set_child(*label);
}
void onBindValue(
const Glib::RefPtr<Gtk::ListItem>& list_item, int i)
{
auto col = std::dynamic_pointer_cast<EditorModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<NoNewlineTextView*>(list_item->get_child());
if (!label)
return;
label->get_buffer()->set_text(col->propertyValues(i).get_value());
if (col->bindingToValues[i])
col->bindingToValues[i]->unbind();
col->bindingToValues[i] = Glib::Binding::bind_property(
label->get_buffer()->property_text(), col->propertyValues(i),
Glib::Binding::Flags::BIDIRECTIONAL);
}
void onUnbindValue(
const Glib::RefPtr<Gtk::ListItem>& list_item, int i)
{
auto col = std::dynamic_pointer_cast<EditorModelColumns>(list_item->get_item());
if (!col)
return;
if (col->bindingToValues[i])
col->bindingToValues[i]->unbind();
col->bindingToValues[i].reset();
}
void on_edited(const Glib::RefPtr<Gtk::ListItem>& list_item, int i)
{
auto col = std::dynamic_pointer_cast<EditorModelColumns>(list_item->get_item());
if (!col)
return;
auto label = dynamic_cast<NoNewlineTextView*>(list_item->get_child());
if (!label)
return;
}
};

490
interface/home.hpp Normal file
View File

@@ -0,0 +1,490 @@
#include <gtkmm.h>
#include <iostream>
#include <glibmm.h>
#include <memory>
#include "interface/log/LogView.hpp"
#include "interface/cpu/CPUView.hpp"
#include "../core/Core.hpp"
#include "interface/cpu/RegView.hpp"
#include "interface/cpu/SymbolMenu.hpp"
#include "interface/memory/MemoryView.hpp"
#include "interface/callstack/CallstackView.hpp"
#include "interface/editor/EditorView.hpp"
class HomeWindow : public Gtk::Window
{
public:
void sendMessage(char id, void* param) const
{
DebugCommand msg{id, param};
if(sock_pair[0] != -1)
{
write(sock_pair[0], &msg, sizeof(DebugCommand));
}
}
protected:
int sock_pair[2]{};
Glib::RefPtr<Gtk::Builder> _refBuilder;
Glib::RefPtr<Gtk::Application> _app = nullptr;
std::shared_ptr<Core> _core = nullptr;
pthread_t _th = 0;
std::string _lastPath = "";
std::string _lastArgv = "";
char buffer[32] = {0};
int ep = -1;
epoll_event ev1 {};
std::vector<cs_insn>* pInsn = nullptr;
public: // Elements
Glib::RefPtr<CPUView> codeView = nullptr;
Glib::RefPtr<LogView> logView = nullptr;
Glib::RefPtr<Gtk::Button> bAttach = nullptr;
Glib::RefPtr<Gtk::Dialog> dialogAttach = nullptr;
Glib::RefPtr<Gtk::Button> dCancel = nullptr;
Glib::RefPtr<Gtk::Button> dAttach = nullptr;
Glib::RefPtr<Gtk::Button> bStop = nullptr;
Glib::RefPtr<Gtk::Button> bCont = nullptr;
Glib::RefPtr<Gtk::Button> bSuspend = nullptr;
Glib::RefPtr<Gtk::Box> debugBox = nullptr;
Glib::RefPtr<Gtk::TextView> tExecutable = nullptr;
Glib::RefPtr<Gtk::TextView> tArg = nullptr;
Glib::RefPtr<Gtk::ScrolledWindow> logScroll = nullptr;
Glib::RefPtr<Gtk::HeaderBar> HeaderBar = nullptr;
Glib::RefPtr<Gtk::Button> bRestart = nullptr;
Glib::RefPtr<RegView> regView = nullptr;
Glib::RefPtr<Gtk::Label> windowTitle = nullptr;
Glib::RefPtr<Gtk::Button> bStepinto = nullptr;
Glib::RefPtr<MemoryView> memory = nullptr;
Glib::RefPtr<Gtk::Popover> popover1 = nullptr;
Glib::RefPtr<Gtk::Box> popover1Box = nullptr;
Glib::RefPtr<Gtk::Label> currentSymbol = nullptr;
Glib::RefPtr<Gtk::Button> bStepover = nullptr;
Glib::RefPtr<SymbolMenu> mSymbols = nullptr;
Glib::RefPtr<Gtk::Button> bTryParse = nullptr;
Glib::RefPtr<CPUView> breakpoints = nullptr;
Glib::RefPtr<Gtk::Stack> stack = nullptr;
Glib::RefPtr<CallstackView> callstack = nullptr;
Glib::RefPtr<Gtk::Button> bGoto = nullptr;
Glib::RefPtr<EditorView> editor = nullptr;
Glib::RefPtr<Gtk::Button> bMemPush = nullptr;
Glib::RefPtr<Gtk::Button> bMemPull = nullptr;
Glib::RefPtr<Gtk::Button> bMemJump = nullptr;
public:
HomeWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder, const Glib::RefPtr<Gtk::Application>& app) :
Gtk::Window(cobject), _refBuilder(refBuilder), _app(app),
codeView(_refBuilder->get_widget_derived<CPUView>(_refBuilder, "code")),
regView(_refBuilder->get_widget_derived<RegView>(_refBuilder, "reg")),
logScroll(refBuilder->get_widget<Gtk::ScrolledWindow>("logScroll")),
bAttach(refBuilder->get_widget<Gtk::Button>("bAttach")),
dialogAttach(refBuilder->get_widget<Gtk::Dialog>("dialogAttach")),
dCancel(refBuilder->get_widget<Gtk::Button>("dCancel")),
dAttach(refBuilder->get_widget<Gtk::Button>("dAttach")),
bStop(refBuilder->get_widget<Gtk::Button>("bStop")),
debugBox(refBuilder->get_widget<Gtk::Box>("debugBox")),
tExecutable(refBuilder->get_widget<Gtk::TextView>("tExecutable")),
tArg(refBuilder->get_widget<Gtk::TextView>("tArg")),
logView(_refBuilder->get_widget_derived<LogView>(_refBuilder, "log")),
bCont(refBuilder->get_widget<Gtk::Button>("bCont")),
bSuspend(refBuilder->get_widget<Gtk::Button>("bSuspend")),
HeaderBar(refBuilder->get_widget<Gtk::HeaderBar>("HeaderBar")),
bRestart(refBuilder->get_widget<Gtk::Button>("bRestart")),
windowTitle(refBuilder->get_widget<Gtk::Label>("windowTitle")),
bStepinto(refBuilder->get_widget<Gtk::Button>("bStepinto")),
memory(_refBuilder->get_widget_derived<MemoryView>(_refBuilder, "memory")),
popover1(refBuilder->get_widget<Gtk::Popover>("popover1")),
popover1Box(refBuilder->get_widget<Gtk::Box>("popover1Box")),
currentSymbol(refBuilder->get_widget<Gtk::Label>("currentSymbol")),
bStepover(refBuilder->get_widget<Gtk::Button>("bStepover")),
mSymbols(refBuilder->get_widget_derived<SymbolMenu>(_refBuilder, "mSymbols")),
bTryParse(refBuilder->get_widget<Gtk::Button>("bTryParse")),
breakpoints(_refBuilder->get_widget_derived<CPUView>(_refBuilder, "breakpoints")),
stack(refBuilder->get_widget<Gtk::Stack>("stack")),
callstack(_refBuilder->get_widget_derived<CallstackView>(_refBuilder, "callstack")),
bGoto(refBuilder->get_widget<Gtk::Button>("bGoto")),
editor(_refBuilder->get_widget_derived<EditorView>(_refBuilder, "editor")),
bMemPush(refBuilder->get_widget<Gtk::Button>("bMemPush")),
bMemPull(refBuilder->get_widget<Gtk::Button>("bMemPull")),
bMemJump(refBuilder->get_widget<Gtk::Button>("bMemJump"))
{
socketpair(AF_UNIX, SOCK_STREAM, 0, sock_pair);
ep = epoll_create1(0);
ev1 = epoll_event{.events = EPOLLIN};
ev1.data.fd = sock_pair[0];
epoll_ctl(ep, EPOLL_CTL_ADD, sock_pair[0], &ev1);
bTryParse->hide();
this->add_tick_callback([this](const Glib::RefPtr<Gdk::FrameClock>& c){
int n = epoll_wait(ep, &ev1, 1, 0);
if(n > 0)
{
auto sz = read(sock_pair[0], buffer, sizeof(DebugCommand));
if(sz != sizeof(DebugCommand)) return true;
auto msg = (DebugCommand*)buffer;
switch (msg->id) {
case MSG_PAUSE:
UpdateUI(1, BTN_CONT | BTN_STOP | BTN_STI);
break;
case MSG_STOP:
_core = nullptr;
UpdateUI(0, BTN_ATTACH);
break;
case MSG_CONTINUE:
UpdateUI(2, BTN_INT | BTN_STOP);
break;
case MSG_STARTUP:
UpdateUI(0, BTN_INT | BTN_STOP);
break;
case MSG_REG:{
auto reg = reinterpret_cast<user_regs_struct*>(msg->param);
UpdateUI(0, 0, reg); // The first two parameters do not take effect when reg isn't empty
codeView->rip = reg->rip;
break;
}
case MSG_QUIT:
return false;
case MSG_LOG:
logView->add_log_data((char*)msg->param);
delete[] (char*)msg->param;
break;
case MSG_TITLE:
windowTitle->set_text((char*)msg->param);
break;
case MSG_MEMORY:{
auto pList = reinterpret_cast<std::vector<MapEntire>*>(msg->param);
memory->set_data(*pList);
break;
}
case MSG_ASM:{
delete pInsn;
pInsn = reinterpret_cast<std::vector<cs_insn>*>(msg->param);
codeView->setData(*pInsn);
break;
}
case MSG_SELECT:
codeView->Select();
break;
case MSG_CURRENTSYMBOL:
currentSymbol->set_text(_core->currentSymbol.name);
break;
case MSG_RESTART:
_core = std::make_shared<Core>(_lastPath, _lastArgv);
_core->pipe = sock_pair[1];
_core->remotePipe = sock_pair[0];
codeView->core = _core;
breakpoints->core = _core;
bAttach->set_sensitive(false);
logView->clear();
break;
case MSG_SYMBOLS:
mSymbols->UpdateList(_core->symbols);
break;
case MSG_NONSYM:
bTryParse->show();
break;
case MSG_INSYM:
bTryParse->hide();
break;
case MSG_GETBREAKS:
{
breakpoints->clear();
auto insn = reinterpret_cast<cs_insn*>(msg->param);
auto count = _core->GetBreakpoints().size();
for (size_t i = 0; i < count; i++) {
char cmdAddr[32], insByte[32];
std::string bytes, cmdStr;
for(int j = 0;j<insn[i].size;j++)
{
sprintf(insByte, "%2x", insn[i].bytes[j]);
bytes += insByte;
}
sprintf(cmdAddr, "%16lx", insn[i].address);
cmdStr = insn[i].mnemonic;
cmdStr += " ";
cmdStr += insn[i].op_str;
breakpoints->add_row(cmdAddr, bytes, cmdStr, _core->ContainsBreakPoint(insn[i].address));
}
delete[] insn;
break;
}
case MSG_CALLSTACK:
{
auto *p = (std::stack<CallstackStruct>*)msg->param;
callstack->clear();
while(!p->empty())
{
std::string name = "Thread: ";
std::vector<CallstackItem> g;
name += std::to_string(p->top().depth);
p->pop();
int depth = INT_MAX;
do
{
char strBuf[512];
depth = p->top().depth;
CallstackItem i{};
i.depth = std::to_string(depth);
sprintf(strBuf, "%lX", p->top().callPoint);
i.callPoint = strBuf;
sprintf(strBuf, "%lX", p->top().stackBase);
i.stackBase = strBuf;
i.symbol = p->top().symbol.name;
i.module = p->top().module;
g.emplace_back(i);
p->pop();
}while(depth);
callstack->append_group(name, g);
}
delete p;
break;
}
default:
break;
}
}
return true;
});
mSymbols->popoverBox = popover1Box;
mSymbols->childLabel = currentSymbol;
mSymbols->port = sock_pair[0];
_app->signal_activate().connect([this](){
_app->add_window(*this);
this->show();
});
codeView->add_css_class("code_view");
dialogAttach->set_hide_on_close(true);
bAttach->signal_clicked().connect([this](){
dialogAttach->set_transient_for(*this);
dialogAttach->show();
});
dCancel->signal_clicked().connect([this](){
dialogAttach->close();
});
dAttach->signal_clicked().connect([this](){
auto s = tExecutable->get_buffer()->get_text();
std::size_t pos = s.rfind('/');
std::string filename = (pos != std::string::npos) ? s.substr(pos + 1) : s;
dialogAttach->close();
_lastPath = s;
_lastArgv = filename;
_core = std::make_shared<Core>(s, filename);
_core->pipe = sock_pair[1];
_core->remotePipe = sock_pair[0];
codeView->core = _core;
breakpoints->core = _core;
bAttach->set_sensitive(false);
logView->clear();
});
bStop->signal_clicked().connect([this](){
if(_core)
{
codeView->clear();
sendMessage(MSG_STOP, nullptr);
_core = nullptr;
codeView->core = nullptr;
breakpoints->core = nullptr;
}
});
bSuspend->signal_clicked().connect([this](){
sendMessage(MSG_PAUSE, nullptr);
});
bCont->signal_clicked().connect([this](){
sendMessage(MSG_CONTINUE, nullptr);
});
bStepinto->signal_clicked().connect([this](){
sendMessage(MSG_STEPINTO, nullptr);
});
bRestart->signal_clicked().connect([this](){
if(!_lastPath.empty())
{
if(!_core)
{
_core = std::make_shared<Core>(_lastPath, _lastArgv);
_core->pipe = sock_pair[1];
_core->remotePipe = sock_pair[0];
codeView->core = _core;
breakpoints->core = _core;
bAttach->set_sensitive(false);
logView->clear();
return;
}
sendMessage(MSG_RESTART, nullptr);
_core = nullptr;
codeView->core = nullptr;
breakpoints->core = nullptr;
printf("%s\n", "Pending to Restart");
}
});
bStepover->signal_clicked().connect([this](){
sendMessage(MSG_STEPOVER, nullptr);
});
bGoto->signal_clicked().connect([this](){
auto i = codeView->GetSelected();
_core->queueMessage(MSG_BREAKONCE, (void*)i);
sendMessage(MSG_CONTINUE, nullptr);
});
bTryParse->signal_clicked().connect([this](){
sendMessage(MSG_PARSE, nullptr);
});
memory->signal_row_activated().connect([this](const Gtk::TreeModel::Path& p, Gtk::TreeViewColumn* c){
auto iter = memory->get_model()->get_iter(p);
if(iter)
{
Glib::ustring addr;
(*iter).get_value(0, addr);
printf("%s\n", addr.c_str());
MapEntire me;
_core->GetMapEntire(std::stoull(addr, nullptr, 16), me);
if(me.access & EXECUTE)
{
auto buf = new char[512];
strcpy(buf, me.path);
sendMessage(MSG_SWITCHMODULE, buf);
}
}
});
stack->property_visible_child().signal_changed().connect([this](){
auto name = stack->get_visible_child_name();
if(name == "Breakpoints" && _core != nullptr)
{
if(_core)
sendMessage(MSG_GETBREAKS, nullptr);
}else if(name == "CPU" && _core != nullptr)
{
if(pInsn)
codeView->setData(*pInsn);
codeView->Select();
}else if(name == "Call Stack" && _core != nullptr)
{
if(_core)
sendMessage(MSG_CALLSTACK, nullptr);
}
});
UpdateUI(0, BTN_ATTACH);
}
static Glib::RefPtr<HomeWindow> create()
{
auto app = Gtk::Application::create("acite.aldbg.app");
auto refBuilder = Gtk::Builder::create();
refBuilder->add_from_file("../aldbg.ui");
auto home = Gtk::Builder::get_widget_derived<HomeWindow>(refBuilder, "MainWindow", app);
if (!home) {
std::cerr << "No \"MainWindow\" object in main-window.ui" << std::endl;
return nullptr;
}
auto css_provider = Gtk::CssProvider::create();
css_provider->load_from_path("../interface/style.css");
// 将 CSS 提供程序应用到屏幕
Gtk::StyleContext::add_provider_for_display(Gdk::Display::get_default(), css_provider, GTK_STYLE_PROVIDER_PRIORITY_USER);
return Glib::make_refptr_for_instance<HomeWindow>(home);
}
enum ButtonMask
{
BTN_ATTACH = 0x01,
BTN_STOP = 0x02,
BTN_CONT = 0x04,
BTN_INT = 0x08,
BTN_STI = 0x10
};
void UpdateUI(int status, uint64_t buttons, user_regs_struct* reg = nullptr)
{
if(reg)
{
regView->clear();
regView->add_data("rax", reg->rax);
regView->add_data("rbx", reg->rbx);
regView->add_data("rcx", reg->rcx);
regView->add_data("rdx", reg->rdx);
regView->add_data("rbp", reg->rbp);
regView->add_data("rsp", reg->rsp);
regView->add_data("pc", reg->rip);
return;
}
switch(status)
{
case 0:
HeaderBar->remove_css_class("cont");
HeaderBar->remove_css_class("trap");
break;
case 1:
HeaderBar->remove_css_class("cont");
HeaderBar->add_css_class("trap");
break;
case 2:
HeaderBar->add_css_class("cont");
HeaderBar->remove_css_class("trap");
break;
default:
break;
}
bSuspend->set_sensitive(buttons & BTN_INT);
bCont->set_sensitive(buttons & BTN_CONT);
bAttach->set_sensitive(buttons & BTN_ATTACH);
bStop->set_sensitive(buttons & BTN_STOP);
bStepinto->set_sensitive(buttons & BTN_STI);
bStepover->set_sensitive(buttons & BTN_STI);
mSymbols->set_sensitive(buttons & BTN_STI);
bGoto->set_sensitive(buttons & BTN_STI);
bMemJump->set_sensitive(buttons & BTN_STI);
bMemPull->set_sensitive(buttons & BTN_STI);
bMemPush->set_sensitive(buttons & BTN_STI);
}
int loop()
{
return _app->run();
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

46
interface/log/LogView.hpp Normal file
View File

@@ -0,0 +1,46 @@
//
// Created by acite on 5/1/24.
//
#include <ctime>
#include <cstring>
#include <gtkmm.h>
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>
class LogView : public Gtk::TreeView
{
protected:
Glib::RefPtr<Gtk::ListStore> _logStore = nullptr;
public:
LogView(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::TreeView(cobject),
_logStore(std::dynamic_pointer_cast<Gtk::ListStore>(get_model()))
{
}
void add_log_data(const std::string& data)
{
auto mm = _logStore->append();
Gtk::TreeModel::Row row = *mm;
time_t currentTime;
time(&currentTime);
tm* localTime = localtime(&currentTime);
char time_str[64];
sprintf(time_str, "[%d:%d:%d]", localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
std::string cppstrtime = time_str;
row.set_value(0, cppstrtime);
row.set_value(1, data);
}
void clear()
{
_logStore->clear();
}
};

View File

@@ -0,0 +1,57 @@
#include <gtkmm.h>
#include "../../core/MemoryMap.hpp"
class MemoryView : public Gtk::TreeView
{
private:
Glib::RefPtr<Gtk::ListStore> _memoryViewStore;
public:
void GetSelection(uint64_t& address)
{
Gtk::TreeModel::Row row = *get_selection()->get_selected();
row.get_value(0, address);
}
std::vector<MapEntire> _map;
MemoryView(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder) : Gtk::TreeView(cobject),
_memoryViewStore(std::dynamic_pointer_cast<Gtk::ListStore>(get_model()))
{
}
void set_data(std::vector<MapEntire>& list)
{
_map = list;
_memoryViewStore->clear();
for(auto e : list)
{
auto mm = _memoryViewStore->append();
Gtk::TreeModel::Row row = *mm;
char startAddr[32], endAddr[32], offset[32];
std::string permission;
permission += (e.access & READ ? "r" : "-");
permission += (e.access & WRITE ? "w" : "-");
permission += (e.access & EXECUTE ? "x" : "-");
permission += (e.access & PRIVATE ? "p" : "-");
permission += (e.access & SHARED ? "s" : "-");
sprintf(startAddr, "%16lx", e.startAddress);
sprintf(endAddr, "%16lx", e.endAddress);
sprintf(offset, "%8x", e.offset);
row.set_value(0, std::string(startAddr));
row.set_value(1, std::string(endAddr));
row.set_value(2, permission);
row.set_value(3, std::string(offset));
row.set_value(4, std::string(e.path));
}
}
};

20
interface/style.css Normal file
View File

@@ -0,0 +1,20 @@
/* 设置窗口的背景颜色 */
/* 设置标签的字体样式 */
label {
font-size: 16px;
font-weight: bold;
}
headerbar.cont {
background-color: #66CC00;
}
headerbar.trap {
background-color: #CC6600;
}
label.highlight {
color: #CC6600;
font-weight: bold;
}

View File

@@ -1,33 +0,0 @@
//
// Created by acite on 5/1/24.
//
#include <ctime>
#include <cstring>
#include <gtkmm.h>
#include <unistd.h>
#include <fcntl.h>
#include "log.h"
#include <pthread.h>
using namespace Gtk;
using namespace std;
extern Glib::RefPtr<ListStore> logStore;
void add_log_data(const std::string& data)
{
auto mm = logStore->append();
Gtk::TreeModel::Row row = *mm;
time_t currentTime;
time(&currentTime);
tm* localTime = localtime(&currentTime);
char time_str[64];
sprintf(time_str, "[%d:%d:%d]", localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
string cppstrtime = time_str;
row.set_value(0, cppstrtime);
row.set_value(1, data);
}

View File

@@ -1,12 +0,0 @@
//
// Created by acite on 5/1/24.
//
#ifndef ALDBG_LOG_H
#define ALDBG_LOG_H
#include <string>
void add_log_data(const std::string& data);
#endif //ALDBG_LOG_H

117
main.cpp
View File

@@ -9,63 +9,43 @@
#include <pthread.h>
#include <sys/wait.h>
#include "cpu/cpu.h"
#include "log/log.h"
#include "interface/home.hpp"
#define MAX_LOG_BUFFER_SIZE (1024*1024)
using namespace std;
using namespace Gtk;
Glib::RefPtr<HomeWindow> home;
extern void button_attach();
extern void button_exec();
TreeView* codeView;
TreeView* logView;
Glib::RefPtr<ListStore> codeViewStore;
Glib::RefPtr<ListStore> logStore;
Button* bAttach;
Dialog* dialogAttach;
Button* dCancel;
Button* dAttach;
Button* bStop;
Window* MainWindow = nullptr;
static Glib::RefPtr<Application> app;
static pthread_t threads[5];
epoll_event events[5] = {
{ .events = EPOLLIN } // Event for pipe data
};
epoll_event r_events[5] = {0};
char buffer[MAX_LOG_BUFFER_SIZE];
ssize_t sz = -1;
int pipefd[2] = {0};
void *aldbg_io_handler(void *arg)
{
int r = pipe2(pipefd, O_CLOEXEC | O_NONBLOCK);
if(r == -1)
{
perror("pipe2()");
return nullptr;
}
dup2(pipefd[1], 1); // dup pipe write port to stdout
int r;
socketpair(AF_UNIX, SOCK_STREAM, 0, pipefd);
dup2(pipefd[1], STDOUT_FILENO); // dup pipe write port to stdout
epoll_event ev{};
ev.events = EPOLLIN;
ev.data.fd = pipefd[0];
events[0].data.fd = pipefd[0];
int efd = epoll_create1(0);
epoll_ctl(efd, EPOLL_CTL_ADD, pipefd[0], &events[0]);
epoll_ctl(efd, EPOLL_CTL_ADD, pipefd[0], &ev);
while(1)
{
r = epoll_wait(efd, r_events, 5, 2000);
r = epoll_wait(efd, &ev, 1, 50);
if(r == -1)perror("epoll_wait()");
if(r == 0)continue;
for(int i=0;i<r;i++)
{
if(r_events[i].data.fd == pipefd[0])
if(r == 1)
{
sz = read(pipefd[0], buffer, MAX_LOG_BUFFER_SIZE);
buffer[sz] = 0;
@@ -73,10 +53,8 @@ void *aldbg_io_handler(void *arg)
char *pStr = strtok(buffer, "\n");
while(pStr)
{
add_log_data(pStr);
pStr = strtok(NULL, "\n");
}
home->logView->add_log_data(pStr);
pStr = strtok(nullptr, "\n");
}
}
}
@@ -84,66 +62,11 @@ void *aldbg_io_handler(void *arg)
return nullptr;
}
bool motion_event(GdkEventMotion* m)
{
double x = m->x;
double y = m->y;
std::cout << "Mouse moved to: (" << x << ", " << y << ")" << std::endl;
return false; // 事件已被处理
}
void window_init()
{
////////////////////////////////////////// register assemblies
auto builder = Builder::create_from_file("../aldbg.glade");
builder->get_widget("MainWindow", MainWindow);
builder->get_widget("code", codeView);
builder->get_widget("log", logView);
builder->get_widget("bAttach", bAttach);
builder->get_widget("dialogAttach", dialogAttach);
builder->get_widget("dCancel", dCancel);
builder->get_widget("dAttach", dAttach);
builder->get_widget("bStop", bStop);
codeViewStore = Glib::RefPtr<Gtk::ListStore>::cast_dynamic(codeView->get_model());
logStore = Glib::RefPtr<Gtk::ListStore>::cast_dynamic(logView->get_model());
///////////////////////////////////////////
app->add_window(*MainWindow);
MainWindow->show(); // Show Window
for(int i=0;i<35;i++)
add_row(to_string(i * 1000), "DAF", "Fuck", "->");
set_row_status(2000, "*->");
///////////////////////////////////////////////////// register events
bAttach->signal_clicked().connect([](){
button_attach();
});
dCancel->signal_clicked().connect([](){
dialogAttach->close();
});
dAttach->signal_clicked().connect([](){
button_exec();
});
bStop->signal_clicked().connect([](){
});
MainWindow->add_events(Gdk::POINTER_MOTION_MASK);
/////////////////////////////////////////////////////
pthread_create(&threads[0], nullptr, aldbg_io_handler, nullptr);
}
int main()
{
app = Application::create();
app->signal_activate().connect([](){
window_init();
});
home = HomeWindow::create();
return app->run();
//pthread_create(&threads[0], nullptr, aldbg_io_handler, nullptr);
return home->loop();
}