[Dwarf-Discuss] [Query] Address Space resolution in Dwarf

Daniel Jacobowitz drow@false.org
Thu Jan 22 14:55:28 GMT 2009


On Thu, Jan 22, 2009 at 09:45:11AM -0500, John DelSignore wrote:
> Just curious... What is "__user" and how is it implemented? Is it
> implemented as a type modifier/qualifier in the compiler? If we turn
> the argument declaration into English, what does it say?

I believe it's an attribute when "compiling" with sparse, a static
checker; it's removed when running GCC or another compiler to build
the kernel.  Obviously, if we want to pass it into the DWARF, it'd
have to be an attribute there too.

Attribute syntax can be generally treated as a type modifier.

> I think "const char __user *filename" could be interpreted in one of two ways:
> 
> 1) filename is a kernel-mode pointer to a user-mode const char.

This one.  The Linux kernel doesn't have C constructs for variables
that live outside of kernel space, to the best of my knowledge.

-- 
Daniel Jacobowitz
CodeSourcery




More information about the Dwarf-discuss mailing list