Permalink
Browse files

TCF Agent: fixed compilation errors on Cygwin

  • Loading branch information...
1 parent 7549a1c commit e7a44ded1ffe81fad9b8d7f88c2641be138613ed Eugene Tarassov committed Jan 4, 2013
Showing with 9 additions and 8 deletions.
  1. +3 −3 agent/tcf/services/breakpoints.c
  2. +6 −5 agent/tcf/services/processes.c
View
6 agent/tcf/services/breakpoints.c
@@ -2553,10 +2553,10 @@ static void safe_skip_breakpoint(void * arg) {
ContextExtensionBP * ext = EXT(ctx);
BreakInstruction * bi = ext->stepping_over_bp;
int error = 0;
-#ifndef NDEBUG
+#ifndef NDEBUG
Context * mem = NULL;
ContextAddress mem_addr = 0;
-#endif
+#endif
assert(bi != NULL);
assert(bi->stepping_over_bp > 0);
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) {
assert(ctx->stopped);
assert(!is_intercepted(ctx));
- assert(context_get_canonical_addr(ctx, get_regs_PC(ctx), &mem, &mem_addr, NULL, NULL) == 0);
+ assert(context_get_canonical_addr(ctx, get_regs_PC(ctx), &mem, &mem_addr, NULL, NULL) == 0);
assert(bi->cb.address == mem_addr);
if (bi->planted) remove_instruction(bi);
View
11 agent/tcf/services/processes.c
@@ -939,17 +939,18 @@ static ProcessOutput * read_process_output(ChildProcess * prs, int fd) {
static int start_process_imp(Channel * c, char ** envp, const char * dir, const char * exe, char ** args,
ProcessStartParams * params, int * selfattach, ChildProcess ** prs) {
- typedef struct _SYSTEM_HANDLE_INFORMATION {
- ULONG Count;
- struct HANDLE_INFORMATION {
+ typedef struct _HANDLE_INFORMATION {
USHORT ProcessId;
USHORT CreatorBackTraceIndex;
UCHAR ObjectTypeNumber;
UCHAR Flags;
USHORT Handle;
PVOID Object;
ACCESS_MASK GrantedAccess;
- } Handles[1];
+ } HANDLE_INFORMATION;
+ typedef struct _SYSTEM_HANDLE_INFORMATION {
+ ULONG Count;
+ HANDLE_INFORMATION Handles[1];
} SYSTEM_HANDLE_INFORMATION;
typedef NTSTATUS (FAR WINAPI * QuerySystemInformationTypedef)(int, PVOID, ULONG, PULONG);
QuerySystemInformationTypedef QuerySystemInformationProc = (QuerySystemInformationTypedef)GetProcAddress(
@@ -964,7 +965,7 @@ static int start_process_imp(Channel * c, char ** envp, const char * dir, const
int err = 0;
int i;
- size = sizeof(SYSTEM_HANDLE_INFORMATION) + sizeof(struct HANDLE_INFORMATION) * 256;
+ size = sizeof(SYSTEM_HANDLE_INFORMATION) + sizeof(HANDLE_INFORMATION) * 256;
hi = (SYSTEM_HANDLE_INFORMATION *)tmp_alloc_zero(size);
for (;;) {
status = QuerySystemInformationProc(SystemHandleInformation, hi, size, &size);

0 comments on commit e7a44de

Please sign in to comment.