[Openmcl-devel] Trouble with ffigen

David Steuber david at david-steuber.com
Thu Feb 3 23:01:07 UTC 2005


On Feb 3, 2005, at 3:06 PM, Helmut Eller wrote:

> I wrote my version for Linux/x86 and the -g3 trick may not work on
> PPC.  It assumes that gcc emits macro definitions for the debugger,
> but not all debugging information formats support macro definitions.
> I think the dwarf2 format supports macro definitions and you should
> invoke ffigen with  -g3 -gdwarf-2.

That did the trick!  There are also a bunch of macro forms ahead of my 
file:

<trimmed stuff>
(macro ("test.h" 65) "__ppc__" "1")
(macro ("test.h" 66) "__POWERPC__" "1")
(macro ("test.h" 67) "__NATURAL_ALIGNMENT__" "1")
(macro ("test.h" 68) "__MACH__" "1")
(macro ("test.h" 69) "__APPLE__" "1")
(type ("test.h" 2)
  "my_type"
  (unsigned ()))
(macro ("test.h" 3) "A_CONSTANT" "42")
(function ("test.h" 4)
  "my_funk"
  (function
   ((int ()) (int ()) )
   (int ())) (extern))

Are those normal?  They look like stuff that would be #define(d) going 
in.

Stumbling through gdb, I did find that with my previous command line 
arguments, ffi_debug_define() and related functions were not being 
called.

I notice that function argument names are not getting into the ffi 
file.  Is there a way to do that?  Would that break 
ccl::parse-standard-ffi-files?

Thanks!




More information about the Openmcl-devel mailing list