gprofng: fix build with -mx32

gprofng/ChangeLog
2022-05-26  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/28983
	* libcollector/libcol_util.h (__collector_getsp, __collector_getfp,
	__collector_getpc): Adapt for build with -mx32
	* libcollector/heaptrace.c: Fix -Wpointer-to-int-cast warnings.
	* libcollector/hwprofile.h: Likewise.
	* libcollector/mmaptrace.c: Likewise.
	* libcollector/synctrace.c: Likewise.
	* libcollector/unwind.c: Likewise.
This commit is contained in:
Vladimir Mezentsev
2022-05-26 12:59:19 -07:00
parent 62b5b11b1b
commit 2a2cb7cf2c
6 changed files with 39 additions and 46 deletions

View File

@@ -223,9 +223,9 @@ memory_error_func (int status ATTRIBUTE_UNUSED, bfd_vma addr ATTRIBUTE_UNUSED,
{ \
context->uc_link = NULL; \
void *sp = __collector_getsp(); \
GET_SP(context) = (greg_t)sp; \
GET_FP(context) = (greg_t)__collector_getfp(); \
GET_PC(context) = (greg_t)__collector_getpc(); \
GET_SP(context) = (intptr_t)sp; \
GET_FP(context) = (intptr_t)__collector_getfp(); \
GET_PC(context) = (intptr_t)__collector_getpc(); \
context->uc_stack.ss_sp = sp; \
context->uc_stack.ss_size = 0x100000; \
}