xref: /haiku/src/kits/debugger/dwarf/DebugInfoEntries.h (revision ac9e464b78d486514f953adafdb5f0b63b8e0203)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Copyright 2013-2018, Rene Gollent, rene@gollent.com.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef DEBUG_INFO_ENTRIES_H
7 #define DEBUG_INFO_ENTRIES_H
8 
9 
10 #include "DebugInfoEntry.h"
11 
12 #include "AttributeValue.h"
13 
14 
15 // common:
16 // DW_AT_name
17 // // not supported by all types:
18 // DW_AT_allocated
19 // DW_AT_associated
20 // DW_AT_data_location
21 // DW_AT_start_scope
22 
23 // modified:
24 // DW_AT_type
25 
26 // declared:
27 // DECL
28 // DW_AT_accessibility		// !file, !pointer to member
29 // DW_AT_declaration		// !file
30 // DW_AT_abstract_origin	// !interface
31 // DW_AT_description		// !interface
32 // DW_AT_visibility			// !interface
33 
34 // derived: declared
35 // DW_AT_type
36 
37 // addressing: modified
38 // DW_AT_address_class
39 
40 // compound: declared
41 // DW_AT_byte_size			// !interface
42 // DW_AT_specification		// !interface
43 
44 // class base: compound
45 
46 // array index: derived
47 // DW_AT_bit_stride
48 // DW_AT_byte_stride
49 // DW_AT_byte_size
50 
51 
52 // unspecified: common
53 // DECL
54 // DW_AT_description
55 
56 
57 
58 // class/structure: class base
59 
60 // interface: class base
61 
62 // union: compound
63 
64 // string: declared
65 // DW_AT_byte_size
66 // DW_AT_string_length
67 
68 // subroutine: declared
69 // DW_AT_address_class
70 // DW_AT_prototyped
71 // DW_AT_type
72 
73 
74 // enumeration: array index
75 // DW_AT_specification
76 
77 // pointer to member: derived
78 // DW_AT_address_class
79 // DW_AT_containing_type
80 // DW_AT_use_location
81 
82 // set: derived
83 // DW_AT_byte_size
84 
85 // subrange: array index
86 // DW_AT_count
87 // DW_AT_lower_bound
88 // DW_AT_threads_scaled
89 // DW_AT_upper_bound
90 
91 // array: derived
92 // DW_AT_bit_stride
93 // DW_AT_byte_size
94 // DW_AT_ordering
95 // DW_AT_specification
96 
97 // typedef: derived
98 
99 // file: derived
100 // DW_AT_byte_size
101 
102 
103 // shared: modified
104 // DECL
105 // DW_AT_count
106 
107 // const: modified
108 
109 // packed: modified
110 
111 // volatile: modified
112 // DECL
113 
114 // restrict: modified
115 
116 // pointer: addressing
117 // DW_AT_specification
118 
119 // reference: addressing
120 
121 
122 // basetype:
123 // DW_AT_binary_scale
124 // DW_AT_bit_offset
125 // DW_AT_bit_size
126 // DW_AT_byte_size
127 // DW_AT_decimal_scale
128 // DW_AT_decimal_sign
129 // DW_AT_description
130 // DW_AT_digit_count
131 // DW_AT_encoding
132 // DW_AT_endianity
133 // DW_AT_picture_string
134 // DW_AT_small
135 
136 
137 class DIECompileUnitBase : public DebugInfoEntry {
138 public:
139 								DIECompileUnitBase();
140 								~DIECompileUnitBase();
141 
142 	virtual	status_t			InitAfterAttributes(
143 									DebugInfoEntryInitInfo& info);
144 
145 	virtual	const char*			Name() const;
146 
147 			const char*			CompilationDir() const
148 									{ return fCompilationDir; }
149 
150 			uint16				Language() const	{ return fLanguage; }
151 
152 			const DebugInfoEntryList& Types() const	{ return fTypes; }
153 			const DebugInfoEntryList& OtherChildren() const
154 										{ return fOtherChildren; }
155 			off_t				AddressRangesOffset() const
156 										{ return fAddressRangesOffset; }
157 
158 			target_addr_t		LowPC() const	{ return fLowPC; }
159 			target_addr_t		HighPC() const	{ return fHighPC; }
160 
161 			off_t				StatementListOffset() const
162 									{ return fStatementListOffset; }
163 
164 			bool				ContainsMainSubprogram() const
165 									{ return fContainsMainSubprogram; }
166 
167 	virtual	status_t			AddChild(DebugInfoEntry* child);
168 
169 	virtual	status_t			AddAttribute_name(uint16 attributeName,
170 									const AttributeValue& value);
171 	virtual	status_t			AddAttribute_comp_dir(uint16 attributeName,
172 									const AttributeValue& value);
173 	virtual	status_t			AddAttribute_low_pc(uint16 attributeName,
174 									const AttributeValue& value);
175 	virtual	status_t			AddAttribute_high_pc(uint16 attributeName,
176 									const AttributeValue& value);
177 	virtual	status_t			AddAttribute_producer(uint16 attributeName,
178 									const AttributeValue& value);
179 	virtual	status_t			AddAttribute_stmt_list(uint16 attributeName,
180 									const AttributeValue& value);
181 	virtual	status_t			AddAttribute_macro_info(uint16 attributeName,
182 									const AttributeValue& value);
183 	virtual	status_t			AddAttribute_base_types(uint16 attributeName,
184 									const AttributeValue& value);
185 	virtual	status_t			AddAttribute_language(uint16 attributeName,
186 									const AttributeValue& value);
187 	virtual	status_t			AddAttribute_identifier_case(
188 									uint16 attributeName,
189 									const AttributeValue& value);
190 	virtual	status_t			AddAttribute_use_UTF8(uint16 attributeName,
191 									const AttributeValue& value);
192 	virtual	status_t			AddAttribute_ranges(uint16 attributeName,
193 									const AttributeValue& value);
194 	virtual	status_t			AddAttribute_main_subprogram(
195 									uint16 attributeName,
196 									const AttributeValue& value);
197 
198 //TODO:
199 //	virtual	status_t			AddAttribute_segment(uint16 attributeName,
200 //									const AttributeValue& value);
201 
202 // TODO: DW_AT_import
203 
204 protected:
205 			const char*			fName;
206 			const char*			fCompilationDir;
207 			target_addr_t		fLowPC;
208 			target_addr_t		fHighPC;
209 			off_t				fStatementListOffset;
210 			off_t				fMacroInfoOffset;
211 			off_t				fAddressRangesOffset;
212 			DIECompileUnitBase*	fBaseTypesUnit;
213 			DebugInfoEntryList	fTypes;
214 			DebugInfoEntryList	fOtherChildren;
215 			uint16				fLanguage;
216 			uint8				fIdentifierCase;
217 			bool				fUseUTF8;
218 			bool				fContainsMainSubprogram;
219 };
220 
221 
222 class DIEType : public DebugInfoEntry {
223 public:
224 								DIEType();
225 
226 	virtual	bool				IsType() const;
227 
228 	virtual	const char*			Name() const;
229 
230 	virtual	bool				IsDeclaration() const;
231 	virtual	const DynamicAttributeValue* ByteSize() const;
232 
233 	virtual	status_t			AddAttribute_name(uint16 attributeName,
234 									const AttributeValue& value);
235 	virtual	status_t			AddAttribute_allocated(uint16 attributeName,
236 									const AttributeValue& value);
237 	virtual	status_t			AddAttribute_associated(uint16 attributeName,
238 									const AttributeValue& value);
239 
240 // TODO:
241 // DW_AT_data_location
242 // DW_AT_start_scope
243 
244 protected:
245 			const char*			fName;
246 			DynamicAttributeValue fAllocated;
247 			DynamicAttributeValue fAssociated;
248 };
249 
250 
251 class DIEModifiedType : public DIEType {
252 public:
253 								DIEModifiedType();
254 
255 			DIEType*			GetType() const	{ return fType; }
256 
257 	virtual	status_t			AddAttribute_type(uint16 attributeName,
258 									const AttributeValue& value);
259 
260 protected:
261 			DIEType*			fType;
262 };
263 
264 
265 class DIEAddressingType : public DIEModifiedType {
266 public:
267 								DIEAddressingType();
268 
269 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
270 									const AttributeValue& value);
271 
272 protected:
273 			uint8				fAddressClass;
274 };
275 
276 
277 class DIEDeclaredType : public DIEType {
278 public:
279 								DIEDeclaredType();
280 
281 	virtual	const char*			Description() const;
282 	virtual	DebugInfoEntry*		AbstractOrigin() const;
283 
284 	virtual DebugInfoEntry*		SignatureType() const;
285 
286 	virtual	bool				IsDeclaration() const;
287 
288 	virtual	status_t			AddAttribute_accessibility(uint16 attributeName,
289 									const AttributeValue& value);
290 										// TODO: !file, !pointer to member
291 	virtual	status_t			AddAttribute_declaration(uint16 attributeName,
292 									const AttributeValue& value);
293 										// TODO: !file
294 	virtual	status_t			AddAttribute_description(uint16 attributeName,
295 									const AttributeValue& value);
296 										// TODO: !interface
297 	virtual	status_t			AddAttribute_abstract_origin(
298 									uint16 attributeName,
299 									const AttributeValue& value);
300 										// TODO: !interface
301 	virtual	status_t			AddAttribute_signature(uint16 attributeName,
302 									const AttributeValue& value);
303 
304 // TODO:
305 // DW_AT_visibility			// !interface
306 
307 protected:
308 	virtual	DeclarationLocation* GetDeclarationLocation();
309 
310 protected:
311 			const char*			fDescription;
312 			DeclarationLocation	fDeclarationLocation;
313 			DebugInfoEntry*		fAbstractOrigin;
314 			DebugInfoEntry*		fSignatureType;
315 			uint8				fAccessibility;
316 			bool				fDeclaration;
317 };
318 
319 
320 class DIEDerivedType : public DIEDeclaredType {
321 public:
322 								DIEDerivedType();
323 
324 			DIEType*			GetType() const	{ return fType; }
325 
326 	virtual	status_t			AddAttribute_type(uint16 attributeName,
327 									const AttributeValue& value);
328 
329 protected:
330 			DIEType*			fType;
331 };
332 
333 
334 class DIECompoundType : public DIEDeclaredType {
335 public:
336 								DIECompoundType();
337 
338 	virtual	bool				IsNamespace() const;
339 
340 	virtual	DebugInfoEntry*		Specification() const;
341 
342 	virtual	const DynamicAttributeValue* ByteSize() const;
343 
344 			const DebugInfoEntryList& DataMembers() const
345 									{ return fDataMembers; }
346 
347 	virtual	status_t			AddChild(DebugInfoEntry* child);
348 
349 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
350 									const AttributeValue& value);
351 										// TODO: !interface
352 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
353 									const AttributeValue& value);
354 										// TODO: !interface
355 
356 protected:
357 			DynamicAttributeValue fByteSize;
358 			DIECompoundType*	fSpecification;
359 			DebugInfoEntryList	fDataMembers;
360 };
361 
362 
363 class DIEClassBaseType : public DIECompoundType {
364 public:
365 								DIEClassBaseType();
366 
367 			const DebugInfoEntryList& BaseTypes() const
368 									{ return fBaseTypes; }
369 			const DebugInfoEntryList& InnerTypes() const
370 									{ return fInnerTypes; }
371 			const DebugInfoEntryList& TemplateParameters() const
372 									{ return fTemplateParameters; }
373 
374 	virtual	status_t			AddChild(DebugInfoEntry* child);
375 
376 protected:
377 			DebugInfoEntryList	fBaseTypes;
378 			DebugInfoEntryList	fFriends;
379 			DebugInfoEntryList	fAccessDeclarations;
380 			DebugInfoEntryList	fMemberFunctions;
381 			DebugInfoEntryList	fInnerTypes;
382 			DebugInfoEntryList	fTemplateParameters;
383 };
384 
385 
386 class DIENamedBase : public DebugInfoEntry {
387 public:
388 								DIENamedBase();
389 
390 	virtual	const char*			Name() const;
391 	virtual	const char*			Description() const;
392 
393 	virtual	status_t			AddAttribute_name(uint16 attributeName,
394 									const AttributeValue& value);
395 	virtual	status_t			AddAttribute_description(uint16 attributeName,
396 									const AttributeValue& value);
397 
398 protected:
399 			const char*			fName;
400 			const char*			fDescription;
401 };
402 
403 
404 class DIEDeclaredBase : public DebugInfoEntry {
405 public:
406 								DIEDeclaredBase();
407 
408 protected:
409 	virtual	DeclarationLocation* GetDeclarationLocation();
410 
411 protected:
412 			DeclarationLocation	fDeclarationLocation;
413 };
414 
415 
416 class DIEDeclaredNamedBase : public DIEDeclaredBase {
417 public:
418 								DIEDeclaredNamedBase();
419 
420 	virtual	const char*			Name() const;
421 	virtual	const char*			Description() const;
422 
423 			uint8				Accessibility() const { return fAccessibility; }
424 			uint8				Visibility() const	{ return fVisibility; }
425 	virtual	bool				IsDeclaration() const;
426 
427 	virtual	status_t			AddAttribute_name(uint16 attributeName,
428 									const AttributeValue& value);
429 	virtual	status_t			AddAttribute_description(uint16 attributeName,
430 									const AttributeValue& value);
431 	virtual	status_t			AddAttribute_accessibility(uint16 attributeName,
432 									const AttributeValue& value);
433 	virtual	status_t			AddAttribute_declaration(uint16 attributeName,
434 									const AttributeValue& value);
435 
436 protected:
437 			const char*			fName;
438 			const char*			fDescription;
439 			uint8				fAccessibility;
440 			uint8				fVisibility;
441 			bool				fDeclaration;
442 };
443 
444 
445 class DIEArrayIndexType : public DIEDerivedType {
446 public:
447 								DIEArrayIndexType();
448 
449 	virtual	const DynamicAttributeValue* ByteSize() const;
450 
451 			const DynamicAttributeValue* BitStride() const
452 									{ return &fBitStride; }
453 			const DynamicAttributeValue* ByteStride() const
454 									{ return &fByteStride; }
455 
456 	virtual	status_t			AddAttribute_bit_stride(uint16 attributeName,
457 									const AttributeValue& value);
458 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
459 									const AttributeValue& value);
460 	virtual	status_t			AddAttribute_byte_stride(uint16 attributeName,
461 									const AttributeValue& value);
462 
463 private:
464 			DynamicAttributeValue fBitStride;
465 			DynamicAttributeValue fByteSize;
466 			DynamicAttributeValue fByteStride;
467 };
468 
469 
470 // #pragma mark -
471 
472 
473 class DIEArrayType : public DIEDerivedType {
474 public:
475 								DIEArrayType();
476 
477 	virtual	uint16				Tag() const;
478 
479 	virtual	status_t			InitAfterHierarchy(
480 									DebugInfoEntryInitInfo& info);
481 
482 	virtual	DebugInfoEntry*		Specification() const;
483 
484 	virtual	const DynamicAttributeValue* ByteSize() const;
485 
486 			const DynamicAttributeValue* BitStride() const
487 									{ return &fBitStride; }
488 
489 			const DebugInfoEntryList& Dimensions() const
490 									{ return fDimensions; }
491 
492 	virtual	status_t			AddChild(DebugInfoEntry* child);
493 
494 	virtual	status_t			AddAttribute_ordering(uint16 attributeName,
495 									const AttributeValue& value);
496 	virtual	status_t			AddAttribute_bit_stride(uint16 attributeName,
497 									const AttributeValue& value);
498 	virtual	status_t			AddAttribute_stride_size(uint16 attributeName,
499 									const AttributeValue& value);
500 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
501 									const AttributeValue& value);
502 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
503 									const AttributeValue& value);
504 
505 private:
506 			DynamicAttributeValue fBitStride;
507 			DynamicAttributeValue fByteSize;
508 			DebugInfoEntryList	fDimensions;
509 			DIEArrayType*		fSpecification;
510 			uint8				fOrdering;
511 };
512 
513 
514 class DIEClassType : public DIEClassBaseType {
515 public:
516 								DIEClassType();
517 
518 	virtual	uint16				Tag() const;
519 };
520 
521 
522 class DIEEntryPoint : public DebugInfoEntry {
523 public:
524 // TODO: Maybe introduce a common base class for DIEEntryPoint and
525 // DIESubprogram.
526 								DIEEntryPoint();
527 
528 	virtual	uint16				Tag() const;
529 
530 // TODO:
531 // DW_AT_address_class
532 // DW_AT_description
533 // DW_AT_frame_base
534 // DW_AT_low_pc
535 // DW_AT_name
536 // DW_AT_return_addr
537 // DW_AT_segment
538 // DW_AT_static_link
539 // DW_AT_type
540 };
541 
542 
543 class DIEEnumerationType : public DIEArrayIndexType {
544 public:
545 								DIEEnumerationType();
546 
547 	virtual	uint16				Tag() const;
548 
549 	virtual	DebugInfoEntry*		Specification() const;
550 
551 			const DebugInfoEntryList& Enumerators() const
552 									{ return fEnumerators; }
553 
554 	virtual	status_t			AddChild(DebugInfoEntry* child);
555 
556 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
557 									const AttributeValue& value);
558 
559 private:
560 			DIEEnumerationType*	fSpecification;
561 			DebugInfoEntryList	fEnumerators;
562 };
563 
564 
565 class DIEFormalParameter : public DIEDeclaredNamedBase {
566 public:
567 								DIEFormalParameter();
568 
569 	virtual	uint16				Tag() const;
570 
571 	virtual	DebugInfoEntry*		AbstractOrigin() const;
572 	virtual	LocationDescription* GetLocationDescription();
573 
574 			DIEType*			GetType() const	{ return fType; }
575 
576 			const ConstantAttributeValue* ConstValue() const
577 									{ return &fValue; }
578 
579 			bool				IsArtificial() const { return fArtificial; }
580 
581 	virtual	status_t			AddAttribute_abstract_origin(
582 									uint16 attributeName,
583 									const AttributeValue& value);
584 	virtual status_t			AddAttribute_artificial(uint16 attributeName,
585 									const AttributeValue& value);
586 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
587 									const AttributeValue& value);
588 	virtual	status_t			AddAttribute_type(uint16 attributeName,
589 									const AttributeValue& value);
590 
591 // TODO:
592 // DW_AT_default_value
593 // DW_AT_endianity
594 // DW_AT_is_optional
595 // DW_AT_segment
596 // DW_AT_variable_parameter
597 
598 private:
599 			LocationDescription	fLocationDescription;
600 			DebugInfoEntry*		fAbstractOrigin;
601 			DIEType*			fType;
602 			ConstantAttributeValue fValue;
603 			bool				fArtificial;
604 };
605 
606 
607 class DIEImportedDeclaration : public DIEDeclaredNamedBase {
608 public:
609 								DIEImportedDeclaration();
610 
611 	virtual	uint16				Tag() const;
612 
613 // TODO:
614 // DW_AT_import
615 // DW_AT_start_scope
616 };
617 
618 
619 class DIELabel : public DIEDeclaredNamedBase {
620 public:
621 								DIELabel();
622 
623 	virtual	uint16				Tag() const;
624 
625 // TODO:
626 // DW_AT_abstract_origin
627 // DW_AT_low_pc
628 // DW_AT_segment
629 // DW_AT_start_scope
630 };
631 
632 
633 class DIELexicalBlock : public DIENamedBase {
634 public:
635 								DIELexicalBlock();
636 
637 	virtual	uint16				Tag() const;
638 
639 	virtual	DebugInfoEntry*		AbstractOrigin() const;
640 
641 			off_t				AddressRangesOffset() const
642 										{ return fAddressRangesOffset; }
643 
644 			target_addr_t		LowPC() const	{ return fLowPC; }
645 			target_addr_t		HighPC() const	{ return fHighPC; }
646 
647 			const DebugInfoEntryList& Variables() const	{ return fVariables; }
648 			const DebugInfoEntryList& Blocks() const	{ return fBlocks; }
649 
650 	virtual	status_t			AddChild(DebugInfoEntry* child);
651 
652 	virtual	status_t			AddAttribute_low_pc(uint16 attributeName,
653 									const AttributeValue& value);
654 	virtual	status_t			AddAttribute_high_pc(uint16 attributeName,
655 									const AttributeValue& value);
656 	virtual	status_t			AddAttribute_ranges(uint16 attributeName,
657 									const AttributeValue& value);
658 	virtual	status_t			AddAttribute_abstract_origin(
659 									uint16 attributeName,
660 									const AttributeValue& value);
661 
662 protected:
663 			DebugInfoEntryList	fVariables;
664 			DebugInfoEntryList	fBlocks;
665 			target_addr_t		fLowPC;
666 			target_addr_t		fHighPC;
667 			off_t				fAddressRangesOffset;
668 			DIELexicalBlock*	fAbstractOrigin;
669 
670 // TODO:
671 // DW_AT_segment
672 };
673 
674 
675 class DIEMember : public DIEDeclaredNamedBase {
676 public:
677 								DIEMember();
678 
679 	virtual	uint16				Tag() const;
680 
681 			DIEType*			GetType() const	{ return fType; }
682 			const DynamicAttributeValue* ByteSize() const
683 									{ return &fByteSize; }
684 			const DynamicAttributeValue* BitOffset() const
685 									{ return &fBitOffset; }
686 			const DynamicAttributeValue* DataBitOffset() const
687 									{ return &fDataBitOffset; }
688 			const DynamicAttributeValue* BitSize() const
689 									{ return &fBitSize; }
690 			const MemberLocation* Location() const
691 									{ return &fLocation; }
692 
693 	virtual	status_t			AddAttribute_type(uint16 attributeName,
694 									const AttributeValue& value);
695 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
696 									const AttributeValue& value);
697 	virtual	status_t			AddAttribute_bit_size(uint16 attributeName,
698 									const AttributeValue& value);
699 	virtual	status_t			AddAttribute_bit_offset(uint16 attributeName,
700 									const AttributeValue& value);
701 	virtual	status_t			AddAttribute_data_bit_offset(
702 									uint16 attributeName,
703 									const AttributeValue& value);
704 	virtual	status_t			AddAttribute_data_member_location(
705 									uint16 attributeName,
706 									const AttributeValue& value);
707 
708 // TODO:
709 // DW_AT_mutable
710 
711 private:
712 			DIEType*			fType;
713 			DynamicAttributeValue fByteSize;
714 			DynamicAttributeValue fBitOffset;
715 			DynamicAttributeValue fDataBitOffset;
716 			DynamicAttributeValue fBitSize;
717 			MemberLocation		fLocation;
718 };
719 
720 
721 class DIEPointerType : public DIEAddressingType {
722 public:
723 								DIEPointerType();
724 
725 	virtual	uint16				Tag() const;
726 
727 	virtual	DebugInfoEntry*		Specification() const;
728 
729 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
730 									const AttributeValue& value);
731 
732 private:
733 			DIEPointerType*		fSpecification;
734 };
735 
736 
737 class DIEReferenceType : public DIEAddressingType {
738 public:
739 								DIEReferenceType();
740 
741 	virtual	uint16				Tag() const;
742 };
743 
744 
745 class DIECompileUnit : public DIECompileUnitBase {
746 public:
747 								DIECompileUnit();
748 
749 	virtual	uint16				Tag() const;
750 };
751 
752 
753 class DIEStringType : public DIEDeclaredType {
754 public:
755 								DIEStringType();
756 
757 	virtual	uint16				Tag() const;
758 
759 	virtual	const DynamicAttributeValue* ByteSize() const;
760 
761 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
762 									const AttributeValue& value);
763 
764 private:
765 			DynamicAttributeValue fByteSize;
766 // TODO:
767 // DW_AT_string_length
768 };
769 
770 
771 class DIEStructureType : public DIEClassBaseType {
772 public:
773 								DIEStructureType();
774 
775 	virtual	uint16				Tag() const;
776 };
777 
778 
779 class DIESubroutineType : public DIEDeclaredType {
780 public:
781 								DIESubroutineType();
782 
783 	virtual	uint16				Tag() const;
784 
785 			DIEType*			ReturnType() const	{ return fReturnType; }
786 
787 			const DebugInfoEntryList& Parameters() const { return fParameters; }
788 
789 	virtual	status_t			AddChild(DebugInfoEntry* child);
790 
791 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
792 									const AttributeValue& value);
793 	virtual	status_t			AddAttribute_prototyped(uint16 attributeName,
794 									const AttributeValue& value);
795 	virtual	status_t			AddAttribute_type(uint16 attributeName,
796 									const AttributeValue& value);
797 
798 protected:
799 			DebugInfoEntryList	fParameters;
800 			DIEType*			fReturnType;
801 			uint8				fAddressClass;
802 			bool				fPrototyped;
803 };
804 
805 
806 class DIETypedef : public DIEDerivedType {
807 public:
808 								DIETypedef();
809 
810 	virtual	uint16				Tag() const;
811 };
812 
813 
814 class DIEUnionType : public DIECompoundType {
815 public:
816 								DIEUnionType();
817 
818 	virtual	uint16				Tag() const;
819 };
820 
821 
822 class DIEUnspecifiedParameters : public DIEDeclaredBase {
823 public:
824 								DIEUnspecifiedParameters();
825 
826 	virtual	uint16				Tag() const;
827 
828 // TODO:
829 // DW_AT_abstract_origin
830 // DW_AT_artificial
831 };
832 
833 
834 class DIEVariant : public DIEDeclaredBase {
835 public:
836 								DIEVariant();
837 
838 	virtual	uint16				Tag() const;
839 
840 // TODO:
841 // DW_AT_accessibility
842 // DW_AT_abstract_origin
843 // DW_AT_declaration
844 // DW_AT_discr_list
845 // DW_AT_discr_value
846 };
847 
848 
849 class DIECommonBlock : public DIEDeclaredNamedBase {
850 public:
851 								DIECommonBlock();
852 
853 	virtual	uint16				Tag() const;
854 
855 	virtual	LocationDescription* GetLocationDescription();
856 
857 // TODO:
858 // DW_AT_segment
859 
860 private:
861 			LocationDescription	fLocationDescription;
862 };
863 
864 
865 class DIECommonInclusion : public DIEDeclaredBase {
866 public:
867 								DIECommonInclusion();
868 
869 	virtual	uint16				Tag() const;
870 
871 // TODO:
872 // DW_AT_common_reference
873 // DW_AT_declaration
874 // DW_AT_visibility
875 
876 };
877 
878 
879 class DIEInheritance : public DIEDeclaredBase {
880 public:
881 								DIEInheritance();
882 
883 	virtual	uint16				Tag() const;
884 
885 			DIEType*			GetType() const	{ return fType; }
886 			const MemberLocation* Location() const
887 									{ return &fLocation; }
888 
889 	virtual	status_t			AddAttribute_type(uint16 attributeName,
890 									const AttributeValue& value);
891 	virtual	status_t			AddAttribute_data_member_location(
892 									uint16 attributeName,
893 									const AttributeValue& value);
894 
895 // TODO:
896 // DW_AT_accessibility
897 // DW_AT_virtuality
898 
899 private:
900 			DIEType*			fType;
901 			MemberLocation		fLocation;
902 };
903 
904 
905 class DIEInlinedSubroutine : public DebugInfoEntry {
906 public:
907 								DIEInlinedSubroutine();
908 
909 	virtual	uint16				Tag() const;
910 
911 // TODO:
912 // DW_AT_abstract_origin
913 // DW_AT_call_column
914 // DW_AT_call_file
915 // DW_AT_call_line
916 // DW_AT_entry_pc
917 // DW_AT_high_pc
918 // DW_AT_low_pc
919 // DW_AT_ranges
920 // DW_AT_return_addr
921 // DW_AT_segment
922 // DW_AT_start_scope
923 // DW_AT_trampoline
924 };
925 
926 
927 class DIEModule : public DIEDeclaredNamedBase {
928 public:
929 								DIEModule();
930 
931 	virtual	uint16				Tag() const;
932 
933 // TODO:
934 // DW_AT_entry_pc
935 // DW_AT_high_pc
936 // DW_AT_low_pc
937 // DW_AT_priority
938 // DW_AT_ranges
939 // DW_AT_segment
940 // DW_AT_specification
941 };
942 
943 
944 class DIEPointerToMemberType : public DIEDerivedType {
945 public:
946 								DIEPointerToMemberType();
947 
948 	virtual	uint16				Tag() const;
949 
950 			DIECompoundType*	ContainingType() const
951 									{ return fContainingType; }
952 
953 			const LocationDescription& UseLocation() const
954 									{ return fUseLocation; }
955 
956 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
957 									const AttributeValue& value);
958 	virtual	status_t			AddAttribute_containing_type(
959 									uint16 attributeName,
960 									const AttributeValue& value);
961 	virtual	status_t			AddAttribute_use_location(uint16 attributeName,
962 									const AttributeValue& value);
963 
964 protected:
965 			DIECompoundType*	fContainingType;
966 			LocationDescription	fUseLocation;
967 			uint8				fAddressClass;
968 };
969 
970 
971 class DIESetType : public DIEDerivedType {
972 public:
973 								DIESetType();
974 
975 	virtual	uint16				Tag() const;
976 
977 	virtual	const DynamicAttributeValue* ByteSize() const;
978 
979 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
980 									const AttributeValue& value);
981 
982 private:
983 			DynamicAttributeValue fByteSize;
984 };
985 
986 
987 class DIESubrangeType : public DIEArrayIndexType {
988 public:
989 								DIESubrangeType();
990 
991 	virtual	uint16				Tag() const;
992 
993 			const DynamicAttributeValue* LowerBound() const
994 									{ return &fLowerBound; }
995 			const DynamicAttributeValue* UpperBound() const
996 									{ return &fUpperBound; }
997 			const DynamicAttributeValue* Count() const
998 									{ return &fCount; }
999 
1000 	virtual	status_t			AddAttribute_count(uint16 attributeName,
1001 									const AttributeValue& value);
1002 	virtual	status_t			AddAttribute_lower_bound(uint16 attributeName,
1003 									const AttributeValue& value);
1004 	virtual	status_t			AddAttribute_upper_bound(uint16 attributeName,
1005 									const AttributeValue& value);
1006 	virtual	status_t			AddAttribute_threads_scaled(
1007 									uint16 attributeName,
1008 									const AttributeValue& value);
1009 
1010 private:
1011 			DynamicAttributeValue fCount;
1012 			DynamicAttributeValue fLowerBound;
1013 			DynamicAttributeValue fUpperBound;
1014 			bool				fThreadsScaled;
1015 };
1016 
1017 
1018 class DIEWithStatement : public DebugInfoEntry {
1019 public:
1020 								DIEWithStatement();
1021 
1022 	virtual	uint16				Tag() const;
1023 
1024 			DIEType*			GetType() const	{ return fType; }
1025 
1026 	virtual	LocationDescription* GetLocationDescription();
1027 
1028 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1029 									const AttributeValue& value);
1030 
1031 // TODO:
1032 // DW_AT_accessibility
1033 // DW_AT_address_class
1034 // DW_AT_declaration
1035 // DW_AT_high_pc
1036 // DW_AT_low_pc
1037 // DW_AT_ranges
1038 // DW_AT_segment
1039 // DW_AT_visibility
1040 
1041 private:
1042 			DIEType*			fType;
1043 			LocationDescription	fLocationDescription;
1044 };
1045 
1046 
1047 class DIEAccessDeclaration : public DIEDeclaredNamedBase {
1048 public:
1049 								DIEAccessDeclaration();
1050 
1051 	virtual	uint16				Tag() const;
1052 };
1053 
1054 
1055 class DIEBaseType : public DIEType {
1056 public:
1057 								DIEBaseType();
1058 
1059 	virtual	uint16				Tag() const;
1060 
1061 	virtual	const DynamicAttributeValue* ByteSize() const;
1062 			const DynamicAttributeValue* BitOffset() const
1063 									{ return &fBitOffset; }
1064 			const DynamicAttributeValue* DataBitOffset() const
1065 									{ return &fDataBitOffset; }
1066 			const DynamicAttributeValue* BitSize() const
1067 									{ return &fBitSize; }
1068 			uint8				Encoding() const	{ return fEncoding; }
1069 			uint8				Endianity() const	{ return fEndianity; }
1070 
1071 	virtual	status_t			AddAttribute_encoding(uint16 attributeName,
1072 									const AttributeValue& value);
1073 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
1074 									const AttributeValue& value);
1075 	virtual	status_t			AddAttribute_bit_size(uint16 attributeName,
1076 									const AttributeValue& value);
1077 	virtual	status_t			AddAttribute_bit_offset(uint16 attributeName,
1078 									const AttributeValue& value);
1079 	virtual	status_t			AddAttribute_data_bit_offset(
1080 									uint16 attributeName,
1081 									const AttributeValue& value);
1082 	virtual	status_t			AddAttribute_endianity(uint16 attributeName,
1083 									const AttributeValue& value);
1084 
1085 // TODO:
1086 // DW_AT_binary_scale
1087 // DW_AT_decimal_scale
1088 // DW_AT_decimal_sign
1089 // DW_AT_description
1090 // DW_AT_digit_count
1091 // DW_AT_picture_string
1092 // DW_AT_small
1093 
1094 private:
1095 			DynamicAttributeValue fByteSize;
1096 			DynamicAttributeValue fBitOffset;
1097 			DynamicAttributeValue fDataBitOffset;
1098 			DynamicAttributeValue fBitSize;
1099 			uint8				fEncoding;
1100 			uint8				fEndianity;
1101 };
1102 
1103 
1104 class DIECatchBlock : public DebugInfoEntry {
1105 public:
1106 								DIECatchBlock();
1107 
1108 	virtual	uint16				Tag() const;
1109 
1110 // TODO:
1111 // DW_AT_abstract_origin
1112 // DW_AT_high_pc
1113 // DW_AT_low_pc
1114 // DW_AT_ranges
1115 // DW_AT_segment
1116 };
1117 
1118 
1119 class DIEConstType : public DIEModifiedType {
1120 public:
1121 								DIEConstType();
1122 
1123 	virtual	uint16				Tag() const;
1124 };
1125 
1126 
1127 class DIEConstant : public DIEDeclaredNamedBase {
1128 public:
1129 								DIEConstant();
1130 
1131 	virtual	uint16				Tag() const;
1132 
1133 			DIEType*			GetType() const	{ return fType; }
1134 
1135 			const ConstantAttributeValue* ConstValue() const
1136 									{ return &fValue; }
1137 
1138 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1139 									const AttributeValue& value);
1140 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1141 									const AttributeValue& value);
1142 
1143 // TODO:
1144 // DW_AT_endianity
1145 // DW_AT_external
1146 // DW_AT_start_scope
1147 
1148 private:
1149 			DIEType*			fType;
1150 			ConstantAttributeValue fValue;
1151 };
1152 
1153 
1154 class DIEEnumerator : public DIEDeclaredNamedBase {
1155 public:
1156 								DIEEnumerator();
1157 
1158 	virtual	uint16				Tag() const;
1159 
1160 			const ConstantAttributeValue* ConstValue() const
1161 									{ return &fValue; }
1162 
1163 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1164 									const AttributeValue& value);
1165 
1166 private:
1167 			ConstantAttributeValue fValue;
1168 };
1169 
1170 
1171 class DIEFileType : public DIEDerivedType {
1172 public:
1173 								DIEFileType();
1174 
1175 	virtual	uint16				Tag() const;
1176 
1177 	virtual	const DynamicAttributeValue* ByteSize() const;
1178 
1179 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
1180 									const AttributeValue& value);
1181 
1182 private:
1183 			DynamicAttributeValue fByteSize;
1184 };
1185 
1186 
1187 class DIEFriend : public DIEDeclaredBase {
1188 public:
1189 								DIEFriend();
1190 
1191 	virtual	uint16				Tag() const;
1192 
1193 // TODO:
1194 // DW_AT_abstract_origin
1195 // DW_AT_friend
1196 };
1197 
1198 
1199 class DIENameList : public DIEDeclaredNamedBase {
1200 public:
1201 								DIENameList();
1202 
1203 	virtual	uint16				Tag() const;
1204 
1205 // TODO:
1206 // DW_AT_abstract_origin
1207 };
1208 
1209 
1210 class DIENameListItem : public DIEDeclaredBase {
1211 public:
1212 								DIENameListItem();
1213 
1214 	virtual	uint16				Tag() const;
1215 
1216 // TODO:
1217 // DW_AT_namelist_item
1218 };
1219 
1220 
1221 class DIEPackedType : public DIEModifiedType {
1222 public:
1223 								DIEPackedType();
1224 
1225 	virtual	uint16				Tag() const;
1226 };
1227 
1228 
1229 class DIESubprogram : public DIEDeclaredNamedBase {
1230 public:
1231 								DIESubprogram();
1232 								~DIESubprogram();
1233 
1234 	virtual	uint16				Tag() const;
1235 
1236 	virtual	DebugInfoEntry*		Specification() const;
1237 	virtual	DebugInfoEntry*		AbstractOrigin() const;
1238 
1239 			off_t				AddressRangesOffset() const
1240 										{ return fAddressRangesOffset; }
1241 
1242 			target_addr_t		LowPC() const	{ return fLowPC; }
1243 			target_addr_t		HighPC() const	{ return fHighPC; }
1244 
1245 			const LocationDescription* FrameBase() const { return &fFrameBase; }
1246 
1247 			const DebugInfoEntryList Parameters() const	{ return fParameters; }
1248 			const DebugInfoEntryList Variables() const	{ return fVariables; }
1249 			const DebugInfoEntryList Blocks() const		{ return fBlocks; }
1250 			const DebugInfoEntryList TemplateTypeParameters() const
1251 										{ return fTemplateTypeParameters; }
1252 			const DebugInfoEntryList TemplateValueParameters() const
1253 										{ return fTemplateValueParameters; }
1254 			const DebugInfoEntryList CallSites() const
1255 										{ return fCallSites; }
1256 
1257 			bool				IsPrototyped() const	{ return fPrototyped; }
1258 			uint8				Inline() const			{ return fInline; }
1259 			bool				IsArtificial() const	{ return fArtificial; }
1260 			uint8				CallingConvention() const
1261 										{ return fCallingConvention; }
1262 			bool				IsMain() const			{ return fMain; }
1263 
1264 			DIEType*			ReturnType() const		{ return fReturnType; }
1265 
1266 	virtual	status_t			AddChild(DebugInfoEntry* child);
1267 
1268 	virtual	status_t			AddAttribute_low_pc(uint16 attributeName,
1269 									const AttributeValue& value);
1270 	virtual	status_t			AddAttribute_high_pc(uint16 attributeName,
1271 									const AttributeValue& value);
1272 	virtual	status_t			AddAttribute_ranges(uint16 attributeName,
1273 									const AttributeValue& value);
1274 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
1275 									const AttributeValue& value);
1276 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
1277 									const AttributeValue& value);
1278 	virtual	status_t			AddAttribute_prototyped(uint16 attributeName,
1279 									const AttributeValue& value);
1280 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1281 									const AttributeValue& value);
1282 	virtual	status_t			AddAttribute_inline(uint16 attributeName,
1283 									const AttributeValue& value);
1284 	virtual	status_t			AddAttribute_abstract_origin(
1285 									uint16 attributeName,
1286 									const AttributeValue& value);
1287 	virtual	status_t			AddAttribute_frame_base(
1288 									uint16 attributeName,
1289 									const AttributeValue& value);
1290 	virtual	status_t			AddAttribute_artificial(
1291 									uint16 attributeName,
1292 									const AttributeValue& value);
1293 	virtual status_t			AddAttribute_calling_convention(
1294 									uint16 attributeName,
1295 									const AttributeValue& value);
1296 	virtual	status_t			AddAttribute_main_subprogram(
1297 									uint16 attributeName,
1298 									const AttributeValue& value);
1299 
1300 
1301 protected:
1302 			DebugInfoEntryList	fParameters;
1303 			DebugInfoEntryList	fVariables;
1304 			DebugInfoEntryList	fBlocks;
1305 			DebugInfoEntryList	fTemplateTypeParameters;
1306 			DebugInfoEntryList	fTemplateValueParameters;
1307 			DebugInfoEntryList	fCallSites;
1308 			target_addr_t		fLowPC;
1309 			target_addr_t		fHighPC;
1310 			off_t				fAddressRangesOffset;
1311 			DIESubprogram*		fSpecification;
1312 			DIESubprogram*		fAbstractOrigin;
1313 			DIEType*			fReturnType;
1314 			LocationDescription	fFrameBase;
1315 			uint8				fAddressClass;
1316 			bool				fPrototyped;
1317 			uint8				fInline;
1318 			bool				fMain;
1319 			bool				fArtificial;
1320 			uint8				fCallingConvention;
1321 
1322 // TODO:
1323 // DW_AT_elemental
1324 // DW_AT_entry_pc
1325 // DW_AT_explicit
1326 // DW_AT_external
1327 // DW_AT_object_pointer
1328 // DW_AT_pure
1329 // DW_AT_recursive
1330 // DW_AT_return_addr
1331 // DW_AT_segment
1332 // DW_AT_start_scope
1333 // DW_AT_static_link
1334 // DW_AT_trampoline
1335 // DW_AT_virtuality
1336 // DW_AT_vtable_elem_location
1337 };
1338 
1339 
1340 class DIETemplateTypeParameter : public DIEDeclaredNamedBase {
1341 public:
1342 								DIETemplateTypeParameter();
1343 
1344 	virtual	uint16				Tag() const;
1345 
1346 			DIEType*			GetType() const	{ return fType; }
1347 
1348 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1349 									const AttributeValue& value);
1350 
1351 private:
1352 			DIEType*			fType;
1353 };
1354 
1355 
1356 class DIETemplateValueParameter : public DIEDeclaredNamedBase {
1357 public:
1358 								DIETemplateValueParameter();
1359 
1360 	virtual	uint16				Tag() const;
1361 
1362 			DIEType*			GetType() const	{ return fType; }
1363 
1364 			const ConstantAttributeValue* ConstValue() const
1365 									{ return &fValue; }
1366 
1367 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1368 									const AttributeValue& value);
1369 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1370 									const AttributeValue& value);
1371 
1372 private:
1373 			DIEType*			fType;
1374 			ConstantAttributeValue fValue;
1375 };
1376 
1377 
1378 class DIEThrownType : public DIEDeclaredBase {
1379 public:
1380 								DIEThrownType();
1381 
1382 	virtual	uint16				Tag() const;
1383 
1384 			DIEType*			GetType() const	{ return fType; }
1385 
1386 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1387 									const AttributeValue& value);
1388 
1389 // TODO:
1390 // DW_AT_allocated
1391 // DW_AT_associated
1392 // DW_AT_data_location
1393 
1394 private:
1395 			DIEType*			fType;
1396 };
1397 
1398 
1399 class DIETryBlock : public DebugInfoEntry {
1400 public:
1401 								DIETryBlock();
1402 
1403 	virtual	uint16				Tag() const;
1404 
1405 // TODO:
1406 // DW_AT_abstract_origin
1407 // DW_AT_high_pc
1408 // DW_AT_low_pc
1409 // DW_AT_ranges
1410 // DW_AT_segment
1411 };
1412 
1413 
1414 class DIEVariantPart : public DIEDeclaredBase {
1415 public:
1416 								DIEVariantPart();
1417 
1418 	virtual	uint16				Tag() const;
1419 
1420 			DIEType*			GetType() const	{ return fType; }
1421 
1422 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1423 									const AttributeValue& value);
1424 
1425 // TODO:
1426 // DW_AT_abstract_origin
1427 // DW_AT_accessibility
1428 // DW_AT_declaration
1429 // DW_AT_discr
1430 
1431 private:
1432 			DIEType*			fType;
1433 };
1434 
1435 
1436 class DIEVariable : public DIEDeclaredNamedBase {
1437 public:
1438 								DIEVariable();
1439 
1440 	virtual	uint16				Tag() const;
1441 
1442 	virtual	DebugInfoEntry*		Specification() const;
1443 	virtual	DebugInfoEntry*		AbstractOrigin() const;
1444 
1445 	virtual	LocationDescription* GetLocationDescription();
1446 
1447 			DIEType*			GetType() const	{ return fType; }
1448 
1449 			const ConstantAttributeValue* ConstValue() const
1450 									{ return &fValue; }
1451 
1452 			uint64				StartScope() const	{ return fStartScope; }
1453 
1454 			bool				IsExternal() const	{ return fIsExternal; }
1455 
1456 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1457 									const AttributeValue& value);
1458 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1459 									const AttributeValue& value);
1460 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
1461 									const AttributeValue& value);
1462 	virtual	status_t			AddAttribute_abstract_origin(
1463 									uint16 attributeName,
1464 									const AttributeValue& value);
1465 	virtual	status_t			AddAttribute_start_scope(
1466 									uint16 attributeName,
1467 									const AttributeValue& value);
1468 	virtual	status_t			AddAttribute_external(
1469 									uint16 attributeName,
1470 									const AttributeValue& value);
1471 
1472 // TODO:
1473 // DW_AT_endianity
1474 // DW_AT_segment
1475 
1476 private:
1477 			LocationDescription	fLocationDescription;
1478 			ConstantAttributeValue fValue;
1479 			DIEType*			fType;
1480 			DebugInfoEntry*		fSpecification;
1481 			DIEVariable*		fAbstractOrigin;
1482 			uint64				fStartScope;
1483 			bool				fIsExternal;
1484 };
1485 
1486 
1487 class DIEVolatileType : public DIEModifiedType {
1488 public:
1489 								DIEVolatileType();
1490 
1491 	virtual	uint16				Tag() const;
1492 
1493 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1494 									const AttributeValue& value);
1495 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1496 									const AttributeValue& value);
1497 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1498 									const AttributeValue& value);
1499 
1500 private:
1501 			DeclarationLocation	fDeclarationLocation;
1502 };
1503 
1504 
1505 class DIEDwarfProcedure : public DebugInfoEntry {
1506 public:
1507 								DIEDwarfProcedure();
1508 
1509 	virtual	uint16				Tag() const;
1510 
1511 	virtual	LocationDescription* GetLocationDescription();
1512 
1513 private:
1514 			LocationDescription	fLocationDescription;
1515 };
1516 
1517 
1518 class DIERestrictType : public DIEModifiedType {
1519 public:
1520 								DIERestrictType();
1521 
1522 	virtual	uint16				Tag() const;
1523 };
1524 
1525 
1526 class DIEInterfaceType : public DIEClassBaseType {
1527 public:
1528 								DIEInterfaceType();
1529 
1530 	virtual	uint16				Tag() const;
1531 };
1532 
1533 
1534 class DIENamespace : public DIEDeclaredNamedBase {
1535 public:
1536 								DIENamespace();
1537 
1538 	virtual	uint16				Tag() const;
1539 
1540 	virtual	bool				IsNamespace() const;
1541 
1542 			const DebugInfoEntryList& Children() const
1543 										{ return fChildren; }
1544 
1545 	virtual	status_t			AddChild(DebugInfoEntry* child);
1546 
1547 private:
1548 			DebugInfoEntryList	fChildren;
1549 
1550 // TODO:
1551 // DW_AT_extension
1552 // DW_AT_start_scope
1553 };
1554 
1555 
1556 class DIEImportedModule : public DIEDeclaredBase {
1557 public:
1558 								DIEImportedModule();
1559 
1560 	virtual	uint16				Tag() const;
1561 
1562 // TODO:
1563 // DW_AT_import
1564 // DW_AT_start_scope
1565 };
1566 
1567 
1568 class DIEUnspecifiedType : public DIEType {
1569 public:
1570 								DIEUnspecifiedType();
1571 
1572 	virtual	uint16				Tag() const;
1573 
1574 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1575 									const AttributeValue& value);
1576 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1577 									const AttributeValue& value);
1578 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1579 									const AttributeValue& value);
1580 
1581 // TODO:
1582 // DW_AT_description
1583 
1584 private:
1585 			DeclarationLocation	fDeclarationLocation;
1586 };
1587 
1588 
1589 class DIEPartialUnit : public DIECompileUnitBase {
1590 public:
1591 								DIEPartialUnit();
1592 
1593 	virtual	uint16				Tag() const;
1594 
1595 // TODO:
1596 // DW_AT_description
1597 };
1598 
1599 
1600 class DIEImportedUnit : public DebugInfoEntry {
1601 public:
1602 								DIEImportedUnit();
1603 
1604 	virtual	uint16				Tag() const;
1605 
1606 // TODO:
1607 // DW_AT_import
1608 };
1609 
1610 
1611 class DIECondition : public DIEDeclaredNamedBase {
1612 public:
1613 								DIECondition();
1614 
1615 	virtual	uint16				Tag() const;
1616 };
1617 
1618 
1619 class DIESharedType : public DIEModifiedType {
1620 public:
1621 								DIESharedType();
1622 
1623 	virtual	uint16				Tag() const;
1624 
1625 	virtual	status_t			AddAttribute_count(uint16 attributeName,
1626 									const AttributeValue& value);
1627 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1628 									const AttributeValue& value);
1629 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1630 									const AttributeValue& value);
1631 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1632 									const AttributeValue& value);
1633 
1634 private:
1635 			DynamicAttributeValue fBlockSize;
1636 			DeclarationLocation	fDeclarationLocation;
1637 };
1638 
1639 
1640 class DIETypeUnit : public DIECompileUnitBase {
1641 public:
1642 								DIETypeUnit();
1643 
1644 	virtual	uint16				Tag() const;
1645 };
1646 
1647 
1648 class DIERValueReferenceType : public DIEReferenceType {
1649 public:
1650 								DIERValueReferenceType();
1651 
1652 	virtual	uint16				Tag() const;
1653 };
1654 
1655 
1656 class DIETemplateTemplateParameter : public DIEDeclaredBase {
1657 public:
1658 								DIETemplateTemplateParameter();
1659 
1660 	virtual	uint16				Tag() const;
1661 
1662 	virtual	const char*			Name() const;
1663 
1664 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1665 									const AttributeValue& value);
1666 
1667 private:
1668 			const char*			fName;
1669 };
1670 
1671 
1672 class DIETemplateTypeParameterPack : public DIEDeclaredBase {
1673 public:
1674 								DIETemplateTypeParameterPack();
1675 
1676 	virtual	uint16				Tag() const;
1677 
1678 	virtual	const char*			Name() const;
1679 
1680 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1681 									const AttributeValue& value);
1682 
1683 			const DebugInfoEntryList& Children() const
1684 										{ return fChildren; }
1685 
1686 	virtual	status_t			AddChild(DebugInfoEntry* child);
1687 
1688 private:
1689 			const char*			fName;
1690 			DebugInfoEntryList	fChildren;
1691 };
1692 
1693 
1694 class DIETemplateValueParameterPack : public DIEDeclaredBase {
1695 public:
1696 								DIETemplateValueParameterPack();
1697 
1698 	virtual	uint16				Tag() const;
1699 
1700 	virtual	const char*			Name() const;
1701 
1702 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1703 									const AttributeValue& value);
1704 
1705 			const DebugInfoEntryList& Children() const
1706 										{ return fChildren; }
1707 
1708 	virtual	status_t			AddChild(DebugInfoEntry* child);
1709 
1710 private:
1711 			const char*			fName;
1712 			DebugInfoEntryList	fChildren;
1713 };
1714 
1715 
1716 class DIECallSite : public DIEDeclaredBase {
1717 public:
1718 								DIECallSite();
1719 
1720 	virtual	uint16				Tag() const;
1721 
1722 	virtual	const char*			Name() const;
1723 
1724 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1725 									const AttributeValue& value);
1726 
1727 			const DebugInfoEntryList& Children() const
1728 										{ return fChildren; }
1729 
1730 	virtual	status_t			AddChild(DebugInfoEntry* child);
1731 
1732 private:
1733 			const char*			fName;
1734 			DebugInfoEntryList	fChildren;
1735 };
1736 
1737 
1738 class DIECallSiteParameter : public DIEDeclaredBase {
1739 public:
1740 								DIECallSiteParameter();
1741 
1742 	virtual	uint16				Tag() const;
1743 
1744 	virtual	const char*			Name() const;
1745 
1746 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1747 									const AttributeValue& value);
1748 
1749 			const DebugInfoEntryList& Children() const
1750 										{ return fChildren; }
1751 
1752 	virtual	status_t			AddChild(DebugInfoEntry* child);
1753 
1754 private:
1755 			const char*			fName;
1756 			DebugInfoEntryList	fChildren;
1757 };
1758 
1759 
1760 // #pragma mark - DebugInfoEntryFactory
1761 
1762 
1763 class DebugInfoEntryFactory {
1764 public:
1765 								DebugInfoEntryFactory();
1766 
1767 			status_t			CreateDebugInfoEntry(uint16 tag,
1768 									DebugInfoEntry*& entry);
1769 };
1770 
1771 
1772 #endif	// DEBUG_INFO_ENTRIES_H
1773