Print this page
rm code review


 237         uint_t ctf_hflags;      /* original flags on the header */
 238 };
 239 
 240 #define LCTF_INDEX_TO_TYPEPTR(fp, i) \
 241         ((ctf_type_t *)((uintptr_t)(fp)->ctf_buf + (fp)->ctf_txlate[(i)]))
 242 
 243 #define LCTF_INFO_KIND(fp, info)        ((fp)->ctf_fileops->ctfo_get_kind(info))
 244 #define LCTF_INFO_ROOT(fp, info)        ((fp)->ctf_fileops->ctfo_get_root(info))
 245 #define LCTF_INFO_VLEN(fp, info)        ((fp)->ctf_fileops->ctfo_get_vlen(info))
 246 
 247 #define LCTF_MMAP       0x0001  /* libctf should munmap buffers on close */
 248 #define LCTF_CHILD      0x0002  /* CTF container is a child */
 249 #define LCTF_RDWR       0x0004  /* CTF container is writable */
 250 #define LCTF_DIRTY      0x0008  /* CTF container has been modified */
 251 
 252 #define CTF_ELF_SCN_NAME        ".SUNW_ctf"
 253 
 254 extern ssize_t ctf_get_ctt_size(const ctf_file_t *, const ctf_type_t *,
 255     ssize_t *, ssize_t *);
 256 


 257 extern const ctf_type_t *ctf_lookup_by_id(ctf_file_t **, ctf_id_t);
 258 
 259 extern ctf_file_t *ctf_fdcreate_int(int, int *, ctf_sect_t *);
 260 
 261 extern int ctf_hash_create(ctf_hash_t *, ulong_t);
 262 extern int ctf_hash_insert(ctf_hash_t *, ctf_file_t *, ushort_t, uint_t);
 263 extern int ctf_hash_define(ctf_hash_t *, ctf_file_t *, ushort_t, uint_t);
 264 extern ctf_helem_t *ctf_hash_lookup(ctf_hash_t *, ctf_file_t *,
 265     const char *, size_t);
 266 extern uint_t ctf_hash_size(const ctf_hash_t *);
 267 extern void ctf_hash_destroy(ctf_hash_t *);
 268 
 269 #define ctf_list_prev(elem)     ((void *)(((ctf_list_t *)(elem))->l_prev))
 270 #define ctf_list_next(elem)     ((void *)(((ctf_list_t *)(elem))->l_next))
 271 
 272 extern void ctf_list_append(ctf_list_t *, void *);
 273 extern void ctf_list_prepend(ctf_list_t *, void *);
 274 extern void ctf_list_insert_before(ctf_list_t *, void *, void *);
 275 extern void ctf_list_delete(ctf_list_t *, void *);
 276 




 237         uint_t ctf_hflags;      /* original flags on the header */
 238 };
 239 
 240 #define LCTF_INDEX_TO_TYPEPTR(fp, i) \
 241         ((ctf_type_t *)((uintptr_t)(fp)->ctf_buf + (fp)->ctf_txlate[(i)]))
 242 
 243 #define LCTF_INFO_KIND(fp, info)        ((fp)->ctf_fileops->ctfo_get_kind(info))
 244 #define LCTF_INFO_ROOT(fp, info)        ((fp)->ctf_fileops->ctfo_get_root(info))
 245 #define LCTF_INFO_VLEN(fp, info)        ((fp)->ctf_fileops->ctfo_get_vlen(info))
 246 
 247 #define LCTF_MMAP       0x0001  /* libctf should munmap buffers on close */
 248 #define LCTF_CHILD      0x0002  /* CTF container is a child */
 249 #define LCTF_RDWR       0x0004  /* CTF container is writable */
 250 #define LCTF_DIRTY      0x0008  /* CTF container has been modified */
 251 
 252 #define CTF_ELF_SCN_NAME        ".SUNW_ctf"
 253 
 254 extern ssize_t ctf_get_ctt_size(const ctf_file_t *, const ctf_type_t *,
 255     ssize_t *, ssize_t *);
 256 
 257 extern void ctf_set_ctt_size(ctf_type_t *, ssize_t);
 258 
 259 extern const ctf_type_t *ctf_lookup_by_id(ctf_file_t **, ctf_id_t);
 260 
 261 extern ctf_file_t *ctf_fdcreate_int(int, int *, ctf_sect_t *);
 262 
 263 extern int ctf_hash_create(ctf_hash_t *, ulong_t);
 264 extern int ctf_hash_insert(ctf_hash_t *, ctf_file_t *, ushort_t, uint_t);
 265 extern int ctf_hash_define(ctf_hash_t *, ctf_file_t *, ushort_t, uint_t);
 266 extern ctf_helem_t *ctf_hash_lookup(ctf_hash_t *, ctf_file_t *,
 267     const char *, size_t);
 268 extern uint_t ctf_hash_size(const ctf_hash_t *);
 269 extern void ctf_hash_destroy(ctf_hash_t *);
 270 
 271 #define ctf_list_prev(elem)     ((void *)(((ctf_list_t *)(elem))->l_prev))
 272 #define ctf_list_next(elem)     ((void *)(((ctf_list_t *)(elem))->l_next))
 273 
 274 extern void ctf_list_append(ctf_list_t *, void *);
 275 extern void ctf_list_prepend(ctf_list_t *, void *);
 276 extern void ctf_list_insert_before(ctf_list_t *, void *, void *);
 277 extern void ctf_list_delete(ctf_list_t *, void *);
 278