Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

TCF Agent: fixed compilation errors on Cygwin

  • Loading branch information...
commit e7a44ded1ffe81fad9b8d7f88c2641be138613ed 1 parent 7549a1c
Eugene Tarassov authored
6 agent/tcf/services/breakpoints.c
@@ -2553,10 +2553,10 @@ static void safe_skip_breakpoint(void * arg) {
2553 2553 ContextExtensionBP * ext = EXT(ctx);
2554 2554 BreakInstruction * bi = ext->stepping_over_bp;
2555 2555 int error = 0;
2556   -#ifndef NDEBUG
  2556 +#ifndef NDEBUG
2557 2557 Context * mem = NULL;
2558 2558 ContextAddress mem_addr = 0;
2559   -#endif
  2559 +#endif
2560 2560 assert(bi != NULL);
2561 2561 assert(bi->stepping_over_bp > 0);
2562 2562 assert(find_instruction(bi->cb.ctx, 0, bi->cb.address, bi->cb.access_types, bi->cb.length) == bi);
@@ -2567,7 +2567,7 @@ static void safe_skip_breakpoint(void * arg) {
2567 2567
2568 2568 assert(ctx->stopped);
2569 2569 assert(!is_intercepted(ctx));
2570   - assert(context_get_canonical_addr(ctx, get_regs_PC(ctx), &mem, &mem_addr, NULL, NULL) == 0);
  2570 + assert(context_get_canonical_addr(ctx, get_regs_PC(ctx), &mem, &mem_addr, NULL, NULL) == 0);
2571 2571 assert(bi->cb.address == mem_addr);
2572 2572
2573 2573 if (bi->planted) remove_instruction(bi);
11 agent/tcf/services/processes.c
@@ -939,9 +939,7 @@ static ProcessOutput * read_process_output(ChildProcess * prs, int fd) {
939 939
940 940 static int start_process_imp(Channel * c, char ** envp, const char * dir, const char * exe, char ** args,
941 941 ProcessStartParams * params, int * selfattach, ChildProcess ** prs) {
942   - typedef struct _SYSTEM_HANDLE_INFORMATION {
943   - ULONG Count;
944   - struct HANDLE_INFORMATION {
  942 + typedef struct _HANDLE_INFORMATION {
945 943 USHORT ProcessId;
946 944 USHORT CreatorBackTraceIndex;
947 945 UCHAR ObjectTypeNumber;
@@ -949,7 +947,10 @@ static int start_process_imp(Channel * c, char ** envp, const char * dir, const
949 947 USHORT Handle;
950 948 PVOID Object;
951 949 ACCESS_MASK GrantedAccess;
952   - } Handles[1];
  950 + } HANDLE_INFORMATION;
  951 + typedef struct _SYSTEM_HANDLE_INFORMATION {
  952 + ULONG Count;
  953 + HANDLE_INFORMATION Handles[1];
953 954 } SYSTEM_HANDLE_INFORMATION;
954 955 typedef NTSTATUS (FAR WINAPI * QuerySystemInformationTypedef)(int, PVOID, ULONG, PULONG);
955 956 QuerySystemInformationTypedef QuerySystemInformationProc = (QuerySystemInformationTypedef)GetProcAddress(
@@ -964,7 +965,7 @@ static int start_process_imp(Channel * c, char ** envp, const char * dir, const
964 965 int err = 0;
965 966 int i;
966 967
967   - size = sizeof(SYSTEM_HANDLE_INFORMATION) + sizeof(struct HANDLE_INFORMATION) * 256;
  968 + size = sizeof(SYSTEM_HANDLE_INFORMATION) + sizeof(HANDLE_INFORMATION) * 256;
968 969 hi = (SYSTEM_HANDLE_INFORMATION *)tmp_alloc_zero(size);
969 970 for (;;) {
970 971 status = QuerySystemInformationProc(SystemHandleInformation, hi, size, &size);

0 comments on commit e7a44de

Please sign in to comment.
Something went wrong with that request. Please try again.