Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#3348 sym conflicts: Rename more multi-word globals #3434

Merged
merged 3 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/arch/arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ far_ibl_set_targets(ibl_code_t src_ibl[], ibl_code_t tgt_ibl[])

/* arch-specific initializations */
void
arch_init(void)
d_r_arch_init(void)
{
ASSERT(sizeof(opnd_t) == EXPECTED_SIZEOF_OPND);
IF_X86(ASSERT(CHECK_TRUNCATE_TYPE_byte(OPSZ_LAST)));
Expand Down Expand Up @@ -853,7 +853,7 @@ arch_profile_exit()
#endif /* WINDOWS_PC_SAMPLE */

/* arch-specific atexit cleanup */
void arch_exit(IF_WINDOWS_ELSE_NP(bool detach_stacked_callbacks, void))
void d_r_arch_exit(IF_WINDOWS_ELSE_NP(bool detach_stacked_callbacks, void))
{
/* we only need to unprotect shared_code for profile extraction
* so we do it there to also cover the fast exit path
Expand Down
6 changes: 3 additions & 3 deletions core/arch/arch_exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ get_time(void);
#endif

void
arch_init(void);
void arch_exit(IF_WINDOWS_ELSE_NP(bool detach_stacked_callbacks, void));
d_r_arch_init(void);
void d_r_arch_exit(IF_WINDOWS_ELSE_NP(bool detach_stacked_callbacks, void));
void
arch_thread_init(dcontext_t *dcontext);
void
Expand Down Expand Up @@ -1527,7 +1527,7 @@ app_pc
canonicalize_pc_target(dcontext_t *dcontext, app_pc pc);

void
decode_init(void);
d_r_decode_init(void);

/***************************************************************************
* Arch-specific defines
Expand Down
4 changes: 2 additions & 2 deletions core/arch/arm/emit_utils.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2014-2016 Google, Inc. All rights reserved.
* Copyright (c) 2014-2019 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -884,7 +884,7 @@ insert_mode_change_handling(dcontext_t *dc, instrlist_t *ilist, instr_t *where,
/* Get LSB from target address */
PRE(ilist, where,
INSTR_CREATE_and(dc, OPREG(scratch1), OPREG(addr_reg), OPND_CREATE_INT(1)));
/* Get right enum value. arch_init() ensures A32 + 1 == Thumb. */
/* Get right enum value. d_r_arch_init() ensures A32 + 1 == Thumb. */
PRE(ilist, where,
INSTR_CREATE_add(dc, OPREG(scratch1), OPREG(scratch1),
OPND_CREATE_INT(DR_ISA_ARM_A32)));
Expand Down
4 changes: 2 additions & 2 deletions core/arch/decode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2011-2018 Google, Inc. All rights reserved.
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/

Expand Down Expand Up @@ -177,7 +177,7 @@ enum {
* as opnd_size_t when we have the type available, so we can overlap
* the two enums by adding new registers consecutively to the reg enum.
* The reg_id_t type is now wider, but for x86 we ensure our values
* all fit via an assert in arch_init().
* all fit via an assert in d_r_arch_init().
* To maintain backward compatibility we keep the OPSZ_ constants
* starting at the same spot, now midway through the reg enum:
*/
Expand Down
6 changes: 3 additions & 3 deletions core/arch/decode_shared.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2011-2017 Google, Inc. All rights reserved.
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2001-2010 VMware, Inc. All rights reserved.
* **********************************************************/

Expand Down Expand Up @@ -314,7 +314,7 @@ const instr_info_t invalid_instr = { OP_INVALID, 0x000000, "(bad)", xx, xx, xx,

/* PR 302344: used for shared traces -tracedump_origins where we
* need to change the mode but we have no dcontext.
* We update this in decode_init() once we have runtime options,
* We update this in d_r_decode_init() once we have runtime options,
* but this is the only version for drdecodelib.
*/
static dr_isa_mode_t initexit_isa_mode = DEFAULT_ISA_MODE_STATIC;
Expand Down Expand Up @@ -389,7 +389,7 @@ decode_debug_checks(void)
#endif

void
decode_init(void)
d_r_decode_init(void)
{
/* DEFAULT_ISA_MODE is no longer constant so we set it here */
initexit_isa_mode = DEFAULT_ISA_MODE;
Expand Down
4 changes: 2 additions & 2 deletions core/arch/opnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ enum {
/* we avoid typedef-ing the enum, as its storage size is compiler-specific */
typedef ushort reg_id_t; /**< The type of a DR_REG_ enum value. */
/* For x86 we do store reg_id_t here, but the x86 DR_REG_ enum is small enough
* (checked in arch_init().
* (checked in d_r_arch_init().
*/
typedef byte opnd_size_t; /**< The type of an OPSZ_ enum value. */

Expand Down Expand Up @@ -1299,7 +1299,7 @@ struct _opnd_t {
};
#endif

/* We assert that our fields are packed properly in arch_init().
/* We assert that our fields are packed properly in d_r_arch_init().
* We could use #pragma pack to shrink x64 back down to 12 bytes (it's at 16
* b/c the struct is aligned to its max field align which is 8), but
* probably not much gain since in either case it's passed/returned as a pointer
Expand Down
4 changes: 2 additions & 2 deletions core/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ get_parameter_ex(const char *name, char *value, int maxlen, bool ignore_cache)
}

int
get_parameter(const char *name, char *value, int maxlen)
d_r_get_parameter(const char *name, char *value, int maxlen)
{
return get_parameter_ex(name, value, maxlen, false);
}
Expand All @@ -718,7 +718,7 @@ int
get_unqualified_parameter(const char *name, char *value, int maxlen)
{
/* we don't use qualified names w/ our config files yet */
return get_parameter(name, value, maxlen);
return d_r_get_parameter(name, value, maxlen);
}

# ifdef UNIX
Expand Down
4 changes: 2 additions & 2 deletions core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ get_config_val_other_arch(const char *var, char *val, size_t valsz, bool *app_sp
# define PARAM_STR(name) L_IF_WIN(name)
/* redeclared in inject_shared.h */
int
get_parameter(const wchar_t *name, char *value, int maxlen);
d_r_get_parameter(const wchar_t *name, char *value, int maxlen);

int
get_parameter_ex(const wchar_t *name, char *value, int maxlen, bool ignore_cache);
Expand All @@ -88,7 +88,7 @@ get_parameter_ex(const wchar_t *name, char *value, int maxlen, bool ignore_cache
# define PARAM_STR(name) name

int
get_parameter(const char *name, char *value, int maxlen);
d_r_get_parameter(const char *name, char *value, int maxlen);

int
get_parameter_ex(const char *name, char *value, int maxlen, bool ignore_cache);
Expand Down
10 changes: 5 additions & 5 deletions core/dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,13 +1016,13 @@ dispatch_exit_fcache(dcontext_t *dcontext)
ASSERT(!is_dynamo_address((byte *)dcontext->app_stack_base - 1) ||
IS_CLIENT_THREAD(dcontext));
ASSERT((SWAP_TEB_STACKBASE() &&
is_dynamo_address((byte *)get_tls(TOP_STACK_TIB_OFFSET) - 1)) ||
is_dynamo_address((byte *)d_r_get_tls(TOP_STACK_TIB_OFFSET) - 1)) ||
(!SWAP_TEB_STACKBASE() &&
!is_dynamo_address((byte *)get_tls(TOP_STACK_TIB_OFFSET) - 1)));
!is_dynamo_address((byte *)d_r_get_tls(TOP_STACK_TIB_OFFSET) - 1)));
ASSERT((SWAP_TEB_STACKLIMIT() &&
is_dynamo_address(get_tls(BASE_STACK_TIB_OFFSET))) ||
is_dynamo_address(d_r_get_tls(BASE_STACK_TIB_OFFSET))) ||
(!SWAP_TEB_STACKLIMIT() &&
!is_dynamo_address(get_tls(BASE_STACK_TIB_OFFSET))));
!is_dynamo_address(d_r_get_tls(BASE_STACK_TIB_OFFSET))));
/* DrMi#1723: ensure client hitting app guard page updated TEB.StackLimit.
* Unfortunately this does happen with fiber code that updates TEB before
* swapping the stack in the next bb so we make it a curiosity.
Expand All @@ -1031,7 +1031,7 @@ dispatch_exit_fcache(dcontext_t *dcontext)
(SWAP_TEB_STACKLIMIT() &&
get_mcontext(dcontext)->xsp >= (reg_t)dcontext->app_stack_limit) ||
(!SWAP_TEB_STACKLIMIT() &&
get_mcontext(dcontext)->xsp >= (reg_t)get_tls(BASE_STACK_TIB_OFFSET)));
get_mcontext(dcontext)->xsp >= (reg_t)d_r_get_tls(BASE_STACK_TIB_OFFSET)));
ASSERT(dcontext->app_nls_cache == NULL ||
dcontext->app_nls_cache != dcontext->priv_nls_cache);
}
Expand Down
2 changes: 1 addition & 1 deletion core/drlibc/drlibc_notdr_printlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "../globals.h"

WEAK void
print_log(file_t logfile, uint mask, uint level, const char *fmt, ...)
d_r_print_log(file_t logfile, uint mask, uint level, const char *fmt, ...)
{
/* Do nothing for non-core. */
}
Loading