Bill,> The reason for it: when going to calculate the CFA in LLVM, the > original code was adding an offset of type i32 to a pointer. This is > fine if pointers are 32-bits, but we get an assert if the types are > different. By converting the cfa_offset to a pointer, we get it to be > that size.Please ignore my prev. e-mail. The code breaks at least 32-bit stuff. The arg of eh_dwarf_cfa is i32, how it can be pointer? -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Hi Anton,> > The reason for it: when going to calculate the CFA in LLVM, the > > original code was adding an offset of type i32 to a pointer. This is > > fine if pointers are 32-bits, but we get an assert if the types are > > different. By converting the cfa_offset to a pointer, we get it to be > > that size. > Please ignore my prev. e-mail. The code breaks at least 32-bit stuff. > The arg of eh_dwarf_cfa is i32, how it can be pointer? >The built-in dwarf_cfa doesn't take an argument. It returns a pointer. But there's an offset associated with the CFA. So it looks like LLVM is taking the pointer and adding the offset to it to synthesize what GCC is doing. I was running it on a 64-bit machine (I didn't know that EH was broken on it), so that's why I had these problems. I thought that there could be 32-bit pointers on a 32-bit system, but maybe I'm wrong? :-) -bw