Age | Commit message (Collapse) | Author | Files | Lines |
|
It's not safe, as we're not sure exactly which wrapper class we have.
This fixes the "unexpected virtual method" errors introduced with
earlier changes.
|
|
To try to diagnose regression introduced by ealier commits, whereby
map_buffer randomly fail, but only on special circunstances.
|
|
reaches zero.
They often aren't. And worst of all, some apps rely on them sticking
around.
With this change, the destruction of wrapper objects is effectively
deferred until a different interface is created on the same pointer
address, or more likely leaked. But this is unavoidable, given there's
no generic mechanism to know for sure when the wrapped object is freed.
Fixes https://github.com/apitrace/apitrace/issues/462
|
|
|
|
|
|
Basic implementation.
|
|
|
|
|
|
As looking up IIDs can be quite time consuming.
|
|
Otherwise it will hit MSVC limits.
|
|
|
|
If nothing else, treat then as IUnknown pointers.
|
|
|
|
|
|
|
|
|
|
It looks like C++ casts end up being too restrictive, with different
casts causing different compilation errors.
|
|
|
|
traceFunctionImplBody/implementWrapperInterfaceMethodBody.
Should make no difference by itself, but it is more useful like that, and
is needed by follow-on changes.
|
|
|
|
The RIID specified in the EmulatedInterface parameter has nothing to do
with the IID returned in the ppContextState parameter.
|
|
whenever possible.
Fixes case when a pointer to a base interface is statically cast to a child
interface, like for example:
ID3D10Texture2D::Release(this = 0x14bb8b8) = 0
...
ID3D10RenderTargetView::GetResource(this = 0x14bdf64, ppResource = &0x14bb8b8)
ID3D10Texture2D::GetDesc(this = 0x14bb8b8, pDesc = ...)
|
|
- Compact code.
- Flush trace before abort.
|
|
|
|
|
|
|
|
|
|
As suggested by Alexander Monakov, given it is no longer necessary with
Android 4.0 onwards.
Also remove all isTracingEnabled logic with it, simplifying code
substantially, and addressing issue #171.
|
|
And implify AttribList in the process.
|
|
No point is keeping two separate tables.
|
|
|
|
It also turns out that no "type" member is needed in AttribArray,
so remove it.
|
|
|
|
- Treat unknown keys the same way while counting elements and while
processing them (they are assumed to be followed by an int value).
- Support custom terminators.
- Serialize the terminator.
- Reduce the line count of generated code a bit.
- Add forgotten begin/endElement() around writing the keys.
- Improve comment wording.
|
|
Also use it for glXCreateConfigAttribsARB, which gives the expected
correct dumps in qapitrace and glretrace dump.
Nothing needs to change in dump code because it just reads whatever
types were written during tracing. Writing different types into
different array elements is allowed by the format, and it turns out
that even older versions of apitrace will correctly display dumps
created with this patch.
|
|
Matches the output of change proposed by Peter Lohrmann in issue #138,
but with slightly less new code.
This is achieved by adding a new hook point, doInvokeFunction (could not
think of a better name), used to generate the call to the real function,
both when trace is enabled or disabled.
|
|
|
|
Backtraces are really disjoint from signature.
This puts back const keyword in most FunctionSig usages.
|
|
Hello,
Changes from v3: Instead of writing the backtrace as Array, the backtrace is
now recorded as a list of stack frame nodes with optional stack frame details
(the scheme is below).
This patch implements backtrace recording during tracing, and adds support in
'apitrace dump' and QApitrace. Backtrace is obtained via platform-specific
functions (and, internally, in platform-specific format). Then it is parsed to
produce an std::vector of stack frame structs: { char *module, *function,
*filename, *linenumber, *offset } (some fields may be NULL) and is written
into the trace file in the Enter call section as a call detail:
BACKTRACE
FRAME
MODULE "module"
FUNCTION "Foo"
FILENAME "foo.cpp"
LINENUMBER "1234"
OFFSET "0xSDF"
FRAME
FUNCTION "Boo"
// no filename line info available for this frame
END_BACKTRACE
A platform-dependent mechanism is provided to specify a set of traced
calls for which backtraces will be recorded. It is possible to specify
either function names, or prefixes of names by appending a '*' (e.g.
"glUniform*").
On Android the backtrace is retrieved from Dalvik via libdvm functions
imported at runtime.
Function set is specified in /data/apitrace.fnames, one per line.
On Linux the backtrace is retrieved via glibc backtrace(), and will not always
yield filename:linenumber information.
Function set is specified via APITRACE_BT_FUNCTIONS environment variable.
On other platforms, obtaining a backtrace is not implemented by this patch.
|
|
|
|
|
|
|
|
Methods from base classes had the same ID in all derived classes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|