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 method for acquiring a runtime log of a program
including at least one function for performing a predetermined process,
comprising changing the address of said at least one function to the
address of a function for log acquisition, wherein said function for log
acquisition comprises: calling said at least one function 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 in a predetermined
manner is defined in a function definition in said program; if yes,
recording a memory content pointed to by said pointer parameter as data
of the specified data type. The type of the pointer parameter may defined
by an index structure, and the determining step includes judging the type
of the pointer parameter by referring to the specified member of the
index structure. The types of the members of the index structure may be
various kinds of unexported functions and various kinds of structures and
etc.