@@ -1136,23 +1136,33 @@ def function_type_tokens(self, func: Function, settings: DisassemblySettings) ->
11361136 tokens .append (InstructionTextToken (InstructionTextTokenType .KeywordToken , "def " ))
11371137 tokens .append (InstructionTextToken (InstructionTextTokenType .CodeSymbolToken , func .name , value = func .start ))
11381138 tokens .append (InstructionTextToken (InstructionTextTokenType .BraceToken , "(" ))
1139+ params = func .type .parameters
11391140 for (i , param ) in enumerate (func .type .parameters_with_all_locations ):
11401141 if i > 0 :
11411142 tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , ", " ))
1143+ var = param .location .variable_for_parameter (i )
11421144 tokens .append (InstructionTextToken (InstructionTextTokenType .ArgumentNameToken , param .name ,
11431145 context = InstructionTextTokenContext .LocalVariableTokenContext ,
1144- address = param . location .identifier ))
1146+ address = var .identifier ))
11451147 tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , ": " ))
11461148 for token in param .type .get_tokens ():
11471149 token .context = InstructionTextTokenContext .LocalVariableTokenContext
1148- token .address = param . location .identifier
1150+ token .address = var .identifier
11491151 tokens .append (token )
1152+ if i < len (params ) and params [i ].location is not None :
1153+ tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , " @ " ))
1154+ tokens .append (InstructionTextToken (InstructionTextTokenType .ValueLocationToken ,
1155+ params [i ].location .to_string (func .arch )))
11501156 tokens .append (InstructionTextToken (InstructionTextTokenType .BraceToken , ")" ))
11511157 if func .can_return .value and func .type .return_value is not None and not isinstance (func .type .return_value , VoidType ):
11521158 tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , " -> " ))
11531159 for token in func .type .return_value .get_tokens ():
11541160 token .context = InstructionTextTokenContext .FunctionReturnTokenContext
11551161 tokens .append (token )
1162+ if func .type .return_value_location is not None :
1163+ tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , " @ " ))
1164+ tokens .append (InstructionTextToken (InstructionTextTokenType .ValueLocationToken ,
1165+ func .type .return_value_location .location .to_string (func .arch )))
11561166 tokens .append (InstructionTextToken (InstructionTextTokenType .TextToken , ":" ))
11571167 return [DisassemblyTextLine (tokens , func .start )]
11581168
0 commit comments