update: trying to debug funcheck hanging
This commit is contained in:
parent
b264fae51a
commit
d1aea1408a
2 changed files with 12 additions and 5 deletions
8
Makefile
8
Makefile
|
|
@ -6,7 +6,7 @@
|
||||||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||||
# Updated: 2024/09/02 16:17:16 by maiboyer ### ########.fr #
|
# Updated: 2024/09/11 17:55:12 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
@ -47,10 +47,10 @@ endif
|
||||||
# CFLAGS_ADDITIONAL += -DNVALGRIND
|
# CFLAGS_ADDITIONAL += -DNVALGRIND
|
||||||
|
|
||||||
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
||||||
CFLAGS_ADDITIONAL += -O0
|
# CFLAGS_ADDITIONAL += -O0
|
||||||
CFLAGS_ADDITIONAL += -Wno-cpp -Wno-type-limits -Wno-unused-command-line-argument
|
# CFLAGS_ADDITIONAL += -Wno-cpp -Wno-type-limits -Wno-unused-command-line-argument
|
||||||
CFLAGS_ADDITIONAL += -gcolumn-info -g3
|
CFLAGS_ADDITIONAL += -gcolumn-info -g3
|
||||||
CFLAGS_ADDITIONAL += '-DERROR=((void)printf("ERROR HERE: " __FILE__ ":%d in %s\n", __LINE__, __func__), 1)'
|
# CFLAGS_ADDITIONAL += '-DERROR=((void)printf("ERROR HERE: " __FILE__ ":%d in %s\n", __LINE__, __func__), 1)'
|
||||||
# CFLAGS_ADDITIONAL += -O2
|
# CFLAGS_ADDITIONAL += -O2
|
||||||
# CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols_count.log
|
# CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols_count.log
|
||||||
# CFLAGS_ADDITIONAL += -fuse-ld=lld -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,-O3 -Wl,--allow-multiple
|
# CFLAGS_ADDITIONAL += -fuse-ld=lld -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,-O3 -Wl,--allow-multiple
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
|
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/08/03 16:34:19 by maiboyer ### ########.fr */
|
/* Updated: 2024/09/11 17:59:17 by maiboyer ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -17,6 +17,12 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static void sig_print_trace(int _idk)
|
||||||
|
{
|
||||||
|
(void)(_idk);
|
||||||
|
print_trace();
|
||||||
|
}
|
||||||
|
|
||||||
t_error install_signal(void)
|
t_error install_signal(void)
|
||||||
{
|
{
|
||||||
struct sigaction data;
|
struct sigaction data;
|
||||||
|
|
@ -27,5 +33,6 @@ t_error install_signal(void)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
if (sigaction(SIGQUIT, &data, NULL))
|
if (sigaction(SIGQUIT, &data, NULL))
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
|
signal(SIGUSR1, sig_print_trace);
|
||||||
return (NO_ERROR);
|
return (NO_ERROR);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue