Commit f3a15607 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't include wine internal functions in the relay debugging table.

parent caf5f89b
...@@ -237,44 +237,49 @@ static void output_exports( FILE *outfile, int nr_exports, int fwd_size ) ...@@ -237,44 +237,49 @@ static void output_exports( FILE *outfile, int nr_exports, int fwd_size )
for (i = Base; i <= Limit; i++) for (i = Base; i <= Limit; i++)
{ {
ORDDEF *odp = Ordinals[i]; ORDDEF *odp = Ordinals[i];
unsigned int j, mask = 0;
if (odp && ((odp->type == TYPE_STDCALL) || /* skip non-existent entry points */
(odp->type == TYPE_STDCALL64) || if (!odp) goto ignore;
(odp->type == TYPE_CDECL) || /* skip non-functions */
(odp->type == TYPE_REGISTER))) if ((odp->type != TYPE_STDCALL) && (odp->type != TYPE_STDCALL64) &&
(odp->type != TYPE_CDECL) && (odp->type != TYPE_REGISTER)) goto ignore;
/* skip wine internal functions */
if (!strncmp( odp->name, "wine_", 5 ) || !strncmp( odp->name, "__wine_", 7 )) goto ignore;
for (j = 0; odp->u.func.arg_types[j]; j++)
{ {
unsigned int j, mask = 0; if (odp->u.func.arg_types[j] == 't') mask |= 1<< (j*2);
for (j = 0; odp->u.func.arg_types[j]; j++) if (odp->u.func.arg_types[j] == 'W') mask |= 2<< (j*2);
{ }
if (odp->u.func.arg_types[j] == 't') mask |= 1<< (j*2);
if (odp->u.func.arg_types[j] == 'W') mask |= 2<< (j*2);
}
switch(odp->type) switch(odp->type)
{ {
case TYPE_STDCALL64: case TYPE_STDCALL64:
if (j < 16) mask |= 0x80000000; if (j < 16) mask |= 0x80000000;
/* fall through */ /* fall through */
case TYPE_STDCALL: case TYPE_STDCALL:
fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc2, 0x%04x, %s, 0x%08x }", fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc2, 0x%04x, %s, 0x%08x }",
strlen(odp->u.func.arg_types) * sizeof(int), strlen(odp->u.func.arg_types) * sizeof(int),
odp->u.func.link_name, mask ); odp->u.func.link_name, mask );
break; break;
case TYPE_CDECL: case TYPE_CDECL:
fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc3, 0x%04x, %s, 0x%08x }", fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc3, 0x%04x, %s, 0x%08x }",
strlen(odp->u.func.arg_types) * sizeof(int), strlen(odp->u.func.arg_types) * sizeof(int),
odp->u.func.link_name, mask ); odp->u.func.link_name, mask );
break; break;
case TYPE_REGISTER: case TYPE_REGISTER:
fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc3, 0x%04x, __regs_%d, 0x%08x }", fprintf( outfile, " { 0xe9, { 0,0,0,0 }, 0xc3, 0x%04x, __regs_%d, 0x%08x }",
0x8000 | (strlen(odp->u.func.arg_types) * sizeof(int)), i, mask ); 0x8000 | (strlen(odp->u.func.arg_types) * sizeof(int)), i, mask );
break; break;
default: default:
assert(0); assert(0);
}
} }
else fprintf( outfile, " { 0, { 0,0,0,0 }, 0, 0, 0, 0 }" ); goto done;
ignore:
fprintf( outfile, " { 0, { 0,0,0,0 }, 0, 0, 0, 0 }" );
done:
if (i < Limit) fprintf( outfile, ",\n" ); if (i < Limit) fprintf( outfile, ",\n" );
} }
#endif /* __i386__ */ #endif /* __i386__ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment