Debug messages :( where are they....?

14 views
Skip to first unread message

Anshuman Dhuliya

unread,
Dec 21, 2015, 10:21:43 AM12/21/15
to gcc-melt
(using ex05 from 'melt-examples' on Githubs here to demonstrate the problem)

No matter what I do the debug messages are not showing,

These are the command line options the Makefile results in

COLLECT_GCC_OPTIONS='-fplugin=melt' '-O' '-v' '-fplugin-arg-melt-mode=searchfflush' '-fplugin-arg-melt-workdir=meltworkdir' '-fplugin-arg-melt-debug' '-fplugin-arg-melt-extra=ex05m-searchfflush' '-c' '-mtune=generic' '-march=x86-64'

The option -fplugin-arg-melt-debug has been added to the Makefile.


##################################
;; PART OF THE CODE EXAMPLE

;; the function triggered by our searchfflush mode                             
(defun searchfflush_docmd (cmd moduldata)                                      
  (debug ">>>>>>>>>>>>>searchfflush_docmd cmd=" cmd)                          ; at least this should be printed!
  (let ( (searchfflushpass (instance class_gcc_gimple_pass                     
                 :named_name '"searchfflush_pass"                              
                 ;; a map to register the visited cfuns                        
                 :gccpass_data (make_maptree discr_map_trees 100)              
                 :gccpass_exec searchfflush_pass_exec))                        
     )                                                                         
    (install_melt_pass_in_gcc searchfflushpass :after '"phiopt" 0)             
    (debug ">>>>>>>>>>>>>searchfflushpass=" searchfflushpass)                  
    (debug ">>>>>>>>>>>>>searchfflush mode success cmd=" cmd)                  
    (return :true)                                                             
    ))                                                                         
##################################


The Wiki says to set the '--enable-check' option while configuring. Is it required? If yes then how and where? Why not by default?

I need it to experiment with MELT. I don't want to use 'code_chunk' all the time. :(



Anshuman Dhuliya

unread,
Dec 22, 2015, 12:09:37 AM12/22/15
to gcc-melt
I have also tried

strings *.so | grep "have debug"

and the result shows it to be enabled.

Basile Starynkevitch

unread,
Dec 24, 2015, 3:31:43 AM12/24/15
to gcc-...@googlegroups.com, anshuma...@gmail.com
On 12/21/2015 04:21 PM, Anshuman Dhuliya wrote:
(using ex05 from 'melt-examples' on Githubs here to demonstrate the problem)


I don't have much time to answer (being on vacation with grandchildren), but to enable debug messages -that is (debug arguments.... ) expressions- and assertions -that is (assert_msg string test .... ) expressions- you need two things:

* when compiling your MELT code, you need to get the quicklybuilt or debugnoline flavor of the module (if using the default optimized flavor, debug facilities are disabled)

* when running your MELT module (of quicklybuilt flavor) you need to pass -fplugin-arg-melt-debug option
I hope this helps.

Merry Christmas to all.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
Reply all
Reply to author
Forward
0 new messages