[Lldb-commits] Patch for Review: Add new Linux auxv types

Kopec, Matt matt.kopec at intel.com
Mon Jun 17 10:17:53 PDT 2013


Looks good to me. I guess these are taken from elf.h?

Ed: Any comments from the FreeBSD side?

Matt

On 2013-06-14, at 8:59 PM, Michael Sartain <mikesart at gmail.com> wrote:

> Linux is setting several auxv types that lldb doesn't know about and lists as "AT_???" in the log file. This fixes that on my 64-bit 12.04 system. Please let me know if this interferes with anything in freebsd or other, and if not I'll check in.
> Thanks.
>  -Mike
> 
> diff -r a2ce67523dc6 source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
> --- a/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp	Fri Jun 14 17:25:52 2013 -0700
> +++ b/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp	Fri Jun 14 17:54:31 2013 -0700
> @@ -129,25 +129,41 @@
>  #define ENTRY_NAME(_type) _type: name = #_type
>      switch (type) 
>      {
> -    case ENTRY_NAME(AT_NULL);   break;
> -    case ENTRY_NAME(AT_IGNORE); break;
> -    case ENTRY_NAME(AT_EXECFD); break;
> -    case ENTRY_NAME(AT_PHDR);   break;
> -    case ENTRY_NAME(AT_PHENT);  break;
> -    case ENTRY_NAME(AT_PHNUM);  break;
> -    case ENTRY_NAME(AT_PAGESZ); break;
> -    case ENTRY_NAME(AT_BASE);   break;
> -    case ENTRY_NAME(AT_FLAGS);  break;
> -    case ENTRY_NAME(AT_ENTRY);  break;
> -    case ENTRY_NAME(AT_NOTELF); break;
> -    case ENTRY_NAME(AT_UID);    break;
> -    case ENTRY_NAME(AT_EUID);   break;
> -    case ENTRY_NAME(AT_GID);    break;
> -    case ENTRY_NAME(AT_EGID);   break;
> -    case ENTRY_NAME(AT_CLKTCK); break;
> +    case ENTRY_NAME(AT_NULL);           break;
> +    case ENTRY_NAME(AT_IGNORE);         break;
> +    case ENTRY_NAME(AT_EXECFD);         break;
> +    case ENTRY_NAME(AT_PHDR);           break;
> +    case ENTRY_NAME(AT_PHENT);          break;
> +    case ENTRY_NAME(AT_PHNUM);          break;
> +    case ENTRY_NAME(AT_PAGESZ);         break;
> +    case ENTRY_NAME(AT_BASE);           break;
> +    case ENTRY_NAME(AT_FLAGS);          break;
> +    case ENTRY_NAME(AT_ENTRY);          break;
> +    case ENTRY_NAME(AT_NOTELF);         break;
> +    case ENTRY_NAME(AT_UID);            break;
> +    case ENTRY_NAME(AT_EUID);           break;
> +    case ENTRY_NAME(AT_GID);            break;
> +    case ENTRY_NAME(AT_EGID);           break;
> +    case ENTRY_NAME(AT_CLKTCK);         break;
> +    case ENTRY_NAME(AT_PLATFORM);       break;
> +    case ENTRY_NAME(AT_HWCAP);          break;
> +    case ENTRY_NAME(AT_FPUCW);          break;
> +    case ENTRY_NAME(AT_DCACHEBSIZE);    break;
> +    case ENTRY_NAME(AT_ICACHEBSIZE);    break;
> +    case ENTRY_NAME(AT_UCACHEBSIZE);    break;
> +    case ENTRY_NAME(AT_IGNOREPPC);      break;
> +    case ENTRY_NAME(AT_SECURE);         break;
> +    case ENTRY_NAME(AT_BASE_PLATFORM);  break;
> +    case ENTRY_NAME(AT_RANDOM);         break;
> +    case ENTRY_NAME(AT_EXECFN);         break;
> +    case ENTRY_NAME(AT_SYSINFO);        break;
> +    case ENTRY_NAME(AT_SYSINFO_EHDR);   break;
> +    case ENTRY_NAME(AT_L1I_CACHESHAPE); break;
> +    case ENTRY_NAME(AT_L1D_CACHESHAPE); break;
> +    case ENTRY_NAME(AT_L2_CACHESHAPE);  break;
> +    case ENTRY_NAME(AT_L3_CACHESHAPE);  break;
>      }
>  #undef ENTRY_NAME
>  
>      return name;
>  }
> -
> diff -r a2ce67523dc6 source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
> --- a/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h	Fri Jun 14 17:25:52 2013 -0700
> +++ b/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h	Fri Jun 14 17:54:31 2013 -0700
> @@ -41,23 +41,41 @@
>      };
>  
>      /// Constants describing the type of entry.
> +    /// On Linux, running "LD_SHOW_AUXV=1 ./executable" will spew AUX information.
>      enum EntryType {
> -        AT_NULL   = 0,          ///< End of auxv.
> -        AT_IGNORE = 1,          ///< Ignore entry.
> -        AT_EXECFD = 2,          ///< File descriptor of program.
> -        AT_PHDR   = 3,          ///< Program headers.
> -        AT_PHENT  = 4,          ///< Size of program header.
> -        AT_PHNUM  = 5,          ///< Number of program headers.
> -        AT_PAGESZ = 6,          ///< Page size.
> -        AT_BASE   = 7,          ///< Interpreter base address.
> -        AT_FLAGS  = 8,          ///< Flags.
> -        AT_ENTRY  = 9,          ///< Program entry point.
> -        AT_NOTELF = 10,         ///< Set if program is not an ELF.
> -        AT_UID    = 11,         ///< UID.
> -        AT_EUID   = 12,         ///< Effective UID.
> -        AT_GID    = 13,         ///< GID.
> -        AT_EGID   = 14,         ///< Effective GID.
> -        AT_CLKTCK = 17          ///< Clock frequency (e.g. times(2)).
> +        AT_NULL           = 0,   ///< End of auxv.
> +        AT_IGNORE         = 1,   ///< Ignore entry.
> +        AT_EXECFD         = 2,   ///< File descriptor of program.
> +        AT_PHDR           = 3,   ///< Program headers.
> +        AT_PHENT          = 4,   ///< Size of program header.
> +        AT_PHNUM          = 5,   ///< Number of program headers.
> +        AT_PAGESZ         = 6,   ///< Page size.
> +        AT_BASE           = 7,   ///< Interpreter base address.
> +        AT_FLAGS          = 8,   ///< Flags.
> +        AT_ENTRY          = 9,   ///< Program entry point.
> +        AT_NOTELF         = 10,  ///< Set if program is not an ELF.
> +        AT_UID            = 11,  ///< UID.
> +        AT_EUID           = 12,  ///< Effective UID.
> +        AT_GID            = 13,  ///< GID.
> +        AT_EGID           = 14,  ///< Effective GID.
> +        AT_CLKTCK         = 17,  ///< Clock frequency (e.g. times(2)).
> +        AT_PLATFORM       = 15,  ///< String identifying platform.  */
> +        AT_HWCAP          = 16,  ///< Machine dependent hints about processor capabilities.  */
> +        AT_FPUCW          = 18,  ///< Used FPU control word.  */
> +        AT_DCACHEBSIZE    = 19,  ///< Data cache block size.  */
> +        AT_ICACHEBSIZE    = 20,  ///< Instruction cache block size.  */
> +        AT_UCACHEBSIZE    = 21,  ///< Unified cache block size.  */
> +        AT_IGNOREPPC      = 22,  ///< Entry should be ignored.  */
> +        AT_SECURE         = 23,  ///< Boolean, was exec setuid-like?  */
> +        AT_BASE_PLATFORM  = 24,  ///< String identifying real platforms.*/
> +        AT_RANDOM         = 25,  ///< Address of 16 random bytes.  */
> +        AT_EXECFN         = 31,  ///< Filename of executable.  */
> +        AT_SYSINFO        = 32,  ///< Pointer to the global system page used for system calls and other nice things.
> +        AT_SYSINFO_EHDR   = 33,  
> +        AT_L1I_CACHESHAPE = 34,  ///< Shapes of the caches.
> +        AT_L1D_CACHESHAPE = 35,
> +        AT_L2_CACHESHAPE  = 36,
> +        AT_L3_CACHESHAPE  = 37,
>      };
>  
>  private:
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list