Skip to content

Commit

Permalink
[monodroid] Include enable_soft_breakpoints() in DEBUG (dotnet#1806)
Browse files Browse the repository at this point in the history
Noticed the following warning in the build log.
`enable_soft_breakpoints()` is called only when `DEBUG` is defined,
so make sure we don't compile it when `DEBUG` is not defined.

        jni/monodroid-glue.c(2493,1): warning GF055929C: unused function 'enable_soft_breakpoints' [-Wunused-function] [/Users/rodo/git/xa2/src/monodroid/monodroid.csproj]
  • Loading branch information
radekdoulik authored and jonpryor committed Jun 12, 2018
1 parent 01988e0 commit 3919704
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/monodroid/jni/monodroid-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,7 @@ static const char *soft_breakpoint_kernel_list[] = {
"2.6.32.21-g1e30168", NULL
};

#ifdef DEBUG
static int
enable_soft_breakpoints (void)
{
Expand Down Expand Up @@ -2438,6 +2439,7 @@ enable_soft_breakpoints (void)
log_info (LOG_DEBUGGER, "soft breakpoints enabled (%s property set to %s)", DEBUG_MONO_SOFT_BREAKPOINTS, value);
return 1;
}
#endif /* DEBUG */

void
set_world_accessable (const char *path)
Expand Down Expand Up @@ -2488,18 +2490,20 @@ copy_file_to_internal_location(char *to, char *from, char* file)
free (from_file);
free (to_file);
}
#else
#else /* !defined (ANDROID) */
#ifdef DEBUG
static int
enable_soft_breakpoints (void)
{
return 0;
}
#endif /* DEBUG */

void
set_world_accessable (const char *path)
{
}
#endif
#endif /* !defined (ANDROID) */

static void
mono_runtime_init (char *runtime_args)
Expand Down

0 comments on commit 3919704

Please sign in to comment.