EP1376366A2

Method for acquiring logs for program debugging

Abstract

A log acquisition method is provided that allows a processing log of software to readily be acquired and reduces the man-hours needed for analyzing a bug. The log acquisition method is a method for acquiring a runtime log of a program 91 including a function (FuncAA), comprising the step of changing the address of the function (FuncAA) loaded to the address of a function (92) for log acquisition and selecting the function (Func AA), wherein the function (92) for log acquisition comprises the steps of: calling the function (Func AA) (96) the log of which is to be acquired to cause a predetermined process to be executed (97), receiving the result of the execution (98), and passing said result to said program 91 (101), recording given information when calling the address of the selected function (Func AA) (95, 100), and recording given information when receiving the result of the execution of the selected function (Func AA) (99, 100).

EP1376366A2, drawing sheet 1
Sheet 1 of 52

Term

Term ended

Projected expiry passed 25 June 2023, 3.2 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

39 claims: 27 independent, 12 dependent

  1. 1
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the step of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition,    wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;determining whether or not a pointer parameter is defined in a predetermined manner in a function definition in said program;and if the pointer parameter is defined in the predetermined manner, recording a memory content pointed to by said pointer parameter as a log according to said definition.
  2. 3
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the step of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition,    wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, and receiving the result of the execution to said program;recording given information when calling said function for performing said predetermined process and recording given information when receiving said result of the execution;determining whether or not there is an unexported function according to a function definition in said program;and if there is an unexported function, generating a new function for log acquisition that corresponds to said unexported function and changing the address of said unexported function into the address of said newly generated function;and said newly generated function comprises the steps of: calling said unexported function to cause said process to be executed and receiving the result of the execution and passing said result to said program;and recording given information when calling said unexported function and recording given information when receiving said result of the execution.
  3. 4
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the step of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition,    wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter is defined as a variable-length array in a function definition in said program;and if a pointer parameter is defined as a variable-length array, recording a memory content pointed to by said pointer parameter as a variable-length array.
  4. 5
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the step of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition,    wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter is specified as a structure in a function definition in said program;and if a pointer parameter is specified as a structure, recording a memory content pointed by said pointer as a log of size of said structure defined in the function definition in said program.
  5. 6
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the step of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition,    wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter the type of which is specified as a structure is defined in a function definition in said program;and if a pointer parameter of the type of which is specified as a structure is defined, recording a memory content pointed to by said pointer parameter as data of the specified data type.
  6. 7
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the process of:changing said method loaded for performing said predetermined process to the address of a method for log acquisition;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermine process to be executed, receiving the result of the execution, and passing said result to said program;determining whether or not a pointer parameter is defined in a predetermined manner in a function definition in said program;and if the pointer parameter is defined in the predetermined definition manner, recording a memory content pointed by said pointer parameter as a log according to said definition.
  7. 9
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the process of:changing said method loaded for performing said predetermined process to the address of a method for log acquisition;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermine process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;recording given information when calling said method for performing said predetermined program and recording given information when receiving said execution result;determining whether or not there is an unexported method according to a function definition in said program;and if there is an unexported method, generating a new method for log acquisition that corresponds to said unexported method and changing the address of said unexported method to the address of said newly generated method;and said newly generated method comprises the steps of: calling said unexported method to cause said process to be executed and receiving the result of the execution and passing said result to said program;and recording given information when calling said unexported method and recording given information when receiving said result of the execution.
  8. 10
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the step of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition,    wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter is defined as a variable-length array in a function definition in said program;and if a pointer parameter is defined as a variable-length array, recording a memory content pointed to by said pointer parameter as a variable-length array.
  9. 11
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the step of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition,    wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter is specified as a structure in a function definition in said program;and if a pointer parameter is specified as a structure, recording a memory content pointed by said pointer as a log of size of said structure defined in the function definition in said program.
  10. 12
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the step of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition,    wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution and passing said result to said program;determining whether or not a pointer parameter the type of which is specified as a structure is defined in a function definition in said program;and if a pointer parameter of the type of which is specified as a structure is defined, recording a memory content pointed to by said pointer parameter as data of the specified data type.
  11. 13
    A storage medium storing a control program for causing a computer to implement the log acquisition method according to any of claims 1 to 12.
  12. 14
    A control program for causing a computer to implement the log acquisition method according to any of claims 1 to 12.
  13. 15
    A log acquisition method for obtaining a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for log acquisition;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said process to be executed, receiving the result of the execution, and passing said result to said program;recording given information as a log when calling said function selected in said selecting step;and recording given information as a log when receiving the result of execution of said function selected in said selecting step.
  14. 16
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for performing said predetermined process;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;recording given information as a log when calling said function for performing said predetermined process and recording given information as a log when receiving the result of execution of said function;and stopping log recording for the function selected in said selecting step.
  15. 19
    A log acquisition method for obtaining a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said process to be executed, receiving the result of the execution, and passing said result to said program;recording given information as a log when calling said method selected in said selecting step;and recording given information as a log when receiving the result of execution of said method selected in said selecting step.
  16. 20
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;recording given information as a log when calling said method for performing said predetermined process and recording given information as a log when receiving the result of execution of said method;and stopping log recording for the method selected in said selecting step.
  17. 29
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for performing said predetermined process;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said function for performing said predetermined process and recording given information as a log when receiving the result of execution of said function;wherein said step of recording as a log records the log on a date-by-date basis.
  18. 30
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for performing said predetermined process;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said function for performing said predetermined process and recording given information as a log when receiving the result of execution of said function;wherein said log recording step generates a new file when the size of the log exceeds a predetermined size.
  19. 31
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for performing said predetermined process;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said function for performing said predetermined process and recording given information as a log when receiving the result of execution of said function;wherein said log recording step generates anew file when the number of logs exceeds a predetermined number.
  20. 32
    A log acquisition method for acquiring a runtime log of a program including a function for performing a predetermined process, comprising the steps of:changing the address of said function loaded for performing said predetermined process to the address of a function for log acquisition;and selecting said function for performing said predetermined process;wherein said function for log acquisition comprises the steps of: calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log in memory when calling said function for performing said predetermined process and recording given information as a log when receiving the result of execution of said function;wherein said step of recording as log in memory moves and stores the log into a disk device when the number of logs in said memory exceeds a predetermined number.
  21. 33
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said method for performing said predetermined process and recording given information as a log when receiving the result of execution of said method;wherein said step of recording as a log records the log on a date-by-date basis.
  22. 34
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said method for performing said predetermined process and recording given information as a log when receiving the result of execution of said method;wherein said log recording step generates a new file when the size of the log exceeds a predetermined size.
  23. 35
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log when calling said method for performing said predetermined process and recording given information as a log when receiving the result of execution of said method;wherein said log recording step generates a new file when the number of logs exceeds a predetermined number.
  24. 36
    A log acquisition method for acquiring a runtime log of a program including a method for performing a predetermined process, comprising the steps of:changing the address of said method loaded for performing said predetermined process to the address of a method for log acquisition;and selecting said method for performing said predetermined process;wherein said method for log acquisition comprises the steps of: calling said method for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;and recording given information as a log in memory when calling said method for performing said predetermined process and recording given information as a log when receiving the result of execution of said method;wherein said step of recording as log in memory moves and stores the log into a disk device when the number of logs in said memory exceeds a predetermined number.
  25. 37
    A storing medium storing a control program for causing a computer to implement the log acquisition method according to any of claims 15 to 36.
  26. 38
    A control program for causing a computer to implement the log acquisition method according to any of claims 15 to 36.
  27. 39
    A software evaluation system for acquiring a runtime log of processing functions carried out by a software program having a plurality of modules comprising a set of executable files and a set of dynamic link libraries, and wherein the program has a function for carrying out a predetermined process;means for calling said function for performing said predetermined process to cause said predetermined process to be executed, receiving the result of the execution, and passing said result to said program;determining whether or not a pointer parameter is defined in a predetermined manner in a function definition in said program;and    if the pointer parameter is defined in the predetermined manner, recording a memory content pointed to by said pointer parameter as a log according to said definition.
Independent claims27