emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is compiling Emacs with -finstrument-functions supported?


From: Arthur Miller
Subject: Re: Is compiling Emacs with -finstrument-functions supported?
Date: Thu, 09 Dec 2021 21:56:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Date: Thu, 09 Dec 2021 18:11:13 +0100
>> 
>> temacs crashes when compiled with -finstrument-functions when it tries to
>> produce dump file:
>> 
>>   CC       json.o
>>   CC       terminfo.o
>>   CC       lastfile.o
>>   CCLD     temacs
>> /usr/bin/mkdir -p ../etc
>> make -C ../lisp update-subdirs
>> make[3]: Går till katalogen ”/home/arthur/repos/emacs-tests/emacs/lisp”
>> make[3]: Lämnar katalogen ”/home/arthur/repos/emacs-tests/emacs/lisp”
>> cp -f temacs bootstrap-emacs
>> rm -f bootstrap-emacs.pdmp
>> ./temacs --batch  -l loadup --temacs=pbootstrap \
>>         --bin-dest /usr/local/bin/ --eln-dest /usr/local/lib/emacs/29.0.50/
>> make[2]: *** [Makefile:908: bootstrap-emacs.pdmp] Segmenteringsfel 
>> (minnesdump)
>> make[2]: Lämnar katalogen ”/home/arthur/repos/emacs-tests/emacs/src”
>> make[1]: *** [Makefile:456: src] Fel 2
>> make[1]: Lämnar katalogen ”/home/arthur/repos/emacs-tests/emacs”
>> make: *** [Makefile:1166: bootstrap] Fel 2
>
> Can you run the failing command under GDB, and when it crashes, post
> the C-level backtrace?

Sorry, my bad; I ended up in infinite loop :). I thought GCC was clever enough
to not instrument trace function on it's own. After adding
no_instrument_function to tracing hooks, it works. 

__attribute__((no_instrument_function))
void __cyg_profile_func_enter (void *func,  void *caller) {
 if(log_file) {
 fprintf(log_file, "IN %p %p\n", func, caller);
 }
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]