xref: /haiku/src/kits/debugger/dwarf/DebugInfoEntries.h (revision 57893202f1849d6e49e3ae88ca6202c18713b775)
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 
CompilationDir()147 			const char*			CompilationDir() const
148 									{ return fCompilationDir; }
149 
Language()150 			uint16				Language() const	{ return fLanguage; }
151 
Types()152 			const DebugInfoEntryList& Types() const	{ return fTypes; }
OtherChildren()153 			const DebugInfoEntryList& OtherChildren() const
154 										{ return fOtherChildren; }
AddressRangesOffset()155 			off_t				AddressRangesOffset() const
156 										{ return fAddressRangesOffset; }
157 
LowPC()158 			target_addr_t		LowPC() const	{ return fLowPC; }
HighPC()159 			target_addr_t		HighPC() const	{ return fHighPC; }
160 
StatementListOffset()161 			off_t				StatementListOffset() const
162 									{ return fStatementListOffset; }
163 
ContainsMainSubprogram()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 
GetType()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 
GetType()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 
DataMembers()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 
BaseTypes()367 			const DebugInfoEntryList& BaseTypes() const
368 									{ return fBaseTypes; }
MemberFunctions()369 			const DebugInfoEntryList& MemberFunctions() const
370 									{ return fMemberFunctions; }
InnerTypes()371 			const DebugInfoEntryList& InnerTypes() const
372 									{ return fInnerTypes; }
TemplateParameters()373 			const DebugInfoEntryList& TemplateParameters() const
374 									{ return fTemplateParameters; }
375 
376 	virtual	status_t			AddChild(DebugInfoEntry* child);
377 
378 protected:
379 			DebugInfoEntryList	fBaseTypes;
380 			DebugInfoEntryList	fFriends;
381 			DebugInfoEntryList	fAccessDeclarations;
382 			DebugInfoEntryList	fMemberFunctions;
383 			DebugInfoEntryList	fInnerTypes;
384 			DebugInfoEntryList	fTemplateParameters;
385 };
386 
387 
388 class DIENamedBase : public DebugInfoEntry {
389 public:
390 								DIENamedBase();
391 
392 	virtual	const char*			Name() const;
393 	virtual	const char*			Description() const;
394 
395 	virtual	status_t			AddAttribute_name(uint16 attributeName,
396 									const AttributeValue& value);
397 	virtual	status_t			AddAttribute_description(uint16 attributeName,
398 									const AttributeValue& value);
399 
400 protected:
401 			const char*			fName;
402 			const char*			fDescription;
403 };
404 
405 
406 class DIEDeclaredBase : public DebugInfoEntry {
407 public:
408 								DIEDeclaredBase();
409 
410 protected:
411 	virtual	DeclarationLocation* GetDeclarationLocation();
412 
413 protected:
414 			DeclarationLocation	fDeclarationLocation;
415 };
416 
417 
418 class DIEDeclaredNamedBase : public DIEDeclaredBase {
419 public:
420 								DIEDeclaredNamedBase();
421 
422 	virtual	const char*			Name() const;
423 	virtual	const char*			Description() const;
424 
Accessibility()425 			uint8				Accessibility() const { return fAccessibility; }
Visibility()426 			uint8				Visibility() const	{ return fVisibility; }
427 	virtual	bool				IsDeclaration() const;
428 
429 	virtual	status_t			AddAttribute_name(uint16 attributeName,
430 									const AttributeValue& value);
431 	virtual	status_t			AddAttribute_description(uint16 attributeName,
432 									const AttributeValue& value);
433 	virtual	status_t			AddAttribute_accessibility(uint16 attributeName,
434 									const AttributeValue& value);
435 	virtual	status_t			AddAttribute_declaration(uint16 attributeName,
436 									const AttributeValue& value);
437 
438 protected:
439 			const char*			fName;
440 			const char*			fDescription;
441 			uint8				fAccessibility;
442 			uint8				fVisibility;
443 			bool				fDeclaration;
444 };
445 
446 
447 class DIEArrayIndexType : public DIEDerivedType {
448 public:
449 								DIEArrayIndexType();
450 
451 	virtual	const DynamicAttributeValue* ByteSize() const;
452 
BitStride()453 			const DynamicAttributeValue* BitStride() const
454 									{ return &fBitStride; }
ByteStride()455 			const DynamicAttributeValue* ByteStride() const
456 									{ return &fByteStride; }
457 
458 	virtual	status_t			AddAttribute_bit_stride(uint16 attributeName,
459 									const AttributeValue& value);
460 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
461 									const AttributeValue& value);
462 	virtual	status_t			AddAttribute_byte_stride(uint16 attributeName,
463 									const AttributeValue& value);
464 
465 private:
466 			DynamicAttributeValue fBitStride;
467 			DynamicAttributeValue fByteSize;
468 			DynamicAttributeValue fByteStride;
469 };
470 
471 
472 // #pragma mark -
473 
474 
475 class DIEArrayType : public DIEDerivedType {
476 public:
477 								DIEArrayType();
478 
479 	virtual	uint16				Tag() const;
480 
481 	virtual	status_t			InitAfterHierarchy(
482 									DebugInfoEntryInitInfo& info);
483 
484 	virtual	DebugInfoEntry*		Specification() const;
485 
486 	virtual	const DynamicAttributeValue* ByteSize() const;
487 
BitStride()488 			const DynamicAttributeValue* BitStride() const
489 									{ return &fBitStride; }
490 
Dimensions()491 			const DebugInfoEntryList& Dimensions() const
492 									{ return fDimensions; }
493 
494 	virtual	status_t			AddChild(DebugInfoEntry* child);
495 
496 	virtual	status_t			AddAttribute_ordering(uint16 attributeName,
497 									const AttributeValue& value);
498 	virtual	status_t			AddAttribute_bit_stride(uint16 attributeName,
499 									const AttributeValue& value);
500 	virtual	status_t			AddAttribute_stride_size(uint16 attributeName,
501 									const AttributeValue& value);
502 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
503 									const AttributeValue& value);
504 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
505 									const AttributeValue& value);
506 
507 private:
508 			DynamicAttributeValue fBitStride;
509 			DynamicAttributeValue fByteSize;
510 			DebugInfoEntryList	fDimensions;
511 			DIEArrayType*		fSpecification;
512 			uint8				fOrdering;
513 };
514 
515 
516 class DIEClassType : public DIEClassBaseType {
517 public:
518 								DIEClassType();
519 
520 	virtual	uint16				Tag() const;
521 };
522 
523 
524 class DIEEntryPoint : public DebugInfoEntry {
525 public:
526 // TODO: Maybe introduce a common base class for DIEEntryPoint and
527 // DIESubprogram.
528 								DIEEntryPoint();
529 
530 	virtual	uint16				Tag() const;
531 
532 // TODO:
533 // DW_AT_address_class
534 // DW_AT_description
535 // DW_AT_frame_base
536 // DW_AT_low_pc
537 // DW_AT_name
538 // DW_AT_return_addr
539 // DW_AT_segment
540 // DW_AT_static_link
541 // DW_AT_type
542 };
543 
544 
545 class DIEEnumerationType : public DIEArrayIndexType {
546 public:
547 								DIEEnumerationType();
548 
549 	virtual	uint16				Tag() const;
550 
551 	virtual	DebugInfoEntry*		Specification() const;
552 
Enumerators()553 			const DebugInfoEntryList& Enumerators() const
554 									{ return fEnumerators; }
555 
556 	virtual	status_t			AddChild(DebugInfoEntry* child);
557 
558 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
559 									const AttributeValue& value);
560 
561 private:
562 			DIEEnumerationType*	fSpecification;
563 			DebugInfoEntryList	fEnumerators;
564 };
565 
566 
567 class DIEFormalParameter : public DIEDeclaredNamedBase {
568 public:
569 								DIEFormalParameter();
570 
571 	virtual	uint16				Tag() const;
572 
573 	virtual	DebugInfoEntry*		AbstractOrigin() const;
574 	virtual	LocationDescription* GetLocationDescription();
575 
GetType()576 			DIEType*			GetType() const	{ return fType; }
577 
ConstValue()578 			const ConstantAttributeValue* ConstValue() const
579 									{ return &fValue; }
580 
IsArtificial()581 			bool				IsArtificial() const { return fArtificial; }
582 
583 	virtual	status_t			AddAttribute_abstract_origin(
584 									uint16 attributeName,
585 									const AttributeValue& value);
586 	virtual status_t			AddAttribute_artificial(uint16 attributeName,
587 									const AttributeValue& value);
588 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
589 									const AttributeValue& value);
590 	virtual	status_t			AddAttribute_type(uint16 attributeName,
591 									const AttributeValue& value);
592 
593 // TODO:
594 // DW_AT_default_value
595 // DW_AT_endianity
596 // DW_AT_is_optional
597 // DW_AT_segment
598 // DW_AT_variable_parameter
599 
600 private:
601 			LocationDescription	fLocationDescription;
602 			DebugInfoEntry*		fAbstractOrigin;
603 			DIEType*			fType;
604 			ConstantAttributeValue fValue;
605 			bool				fArtificial;
606 };
607 
608 
609 class DIEImportedDeclaration : public DIEDeclaredNamedBase {
610 public:
611 								DIEImportedDeclaration();
612 
613 	virtual	uint16				Tag() const;
614 
615 // TODO:
616 // DW_AT_import
617 // DW_AT_start_scope
618 };
619 
620 
621 class DIELabel : public DIEDeclaredNamedBase {
622 public:
623 								DIELabel();
624 
625 	virtual	uint16				Tag() const;
626 
627 // TODO:
628 // DW_AT_abstract_origin
629 // DW_AT_low_pc
630 // DW_AT_segment
631 // DW_AT_start_scope
632 };
633 
634 
635 class DIELexicalBlock : public DIENamedBase {
636 public:
637 								DIELexicalBlock();
638 
639 	virtual	uint16				Tag() const;
640 
641 	virtual	DebugInfoEntry*		AbstractOrigin() const;
642 
AddressRangesOffset()643 			off_t				AddressRangesOffset() const
644 										{ return fAddressRangesOffset; }
645 
LowPC()646 			target_addr_t		LowPC() const	{ return fLowPC; }
HighPC()647 			target_addr_t		HighPC() const	{ return fHighPC; }
648 
Variables()649 			const DebugInfoEntryList& Variables() const	{ return fVariables; }
Blocks()650 			const DebugInfoEntryList& Blocks() const	{ return fBlocks; }
651 
652 	virtual	status_t			AddChild(DebugInfoEntry* child);
653 
654 	virtual	status_t			AddAttribute_low_pc(uint16 attributeName,
655 									const AttributeValue& value);
656 	virtual	status_t			AddAttribute_high_pc(uint16 attributeName,
657 									const AttributeValue& value);
658 	virtual	status_t			AddAttribute_ranges(uint16 attributeName,
659 									const AttributeValue& value);
660 	virtual	status_t			AddAttribute_abstract_origin(
661 									uint16 attributeName,
662 									const AttributeValue& value);
663 
664 protected:
665 			DebugInfoEntryList	fVariables;
666 			DebugInfoEntryList	fBlocks;
667 			target_addr_t		fLowPC;
668 			target_addr_t		fHighPC;
669 			off_t				fAddressRangesOffset;
670 			DIELexicalBlock*	fAbstractOrigin;
671 
672 // TODO:
673 // DW_AT_segment
674 };
675 
676 
677 class DIEMember : public DIEDeclaredNamedBase {
678 public:
679 								DIEMember();
680 
681 	virtual	uint16				Tag() const;
682 
GetType()683 			DIEType*			GetType() const	{ return fType; }
ByteSize()684 			const DynamicAttributeValue* ByteSize() const
685 									{ return &fByteSize; }
BitOffset()686 			const DynamicAttributeValue* BitOffset() const
687 									{ return &fBitOffset; }
DataBitOffset()688 			const DynamicAttributeValue* DataBitOffset() const
689 									{ return &fDataBitOffset; }
BitSize()690 			const DynamicAttributeValue* BitSize() const
691 									{ return &fBitSize; }
Location()692 			const MemberLocation* Location() const
693 									{ return &fLocation; }
694 
695 	virtual	status_t			AddAttribute_type(uint16 attributeName,
696 									const AttributeValue& value);
697 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
698 									const AttributeValue& value);
699 	virtual	status_t			AddAttribute_bit_size(uint16 attributeName,
700 									const AttributeValue& value);
701 	virtual	status_t			AddAttribute_bit_offset(uint16 attributeName,
702 									const AttributeValue& value);
703 	virtual	status_t			AddAttribute_data_bit_offset(
704 									uint16 attributeName,
705 									const AttributeValue& value);
706 	virtual	status_t			AddAttribute_data_member_location(
707 									uint16 attributeName,
708 									const AttributeValue& value);
709 
710 // TODO:
711 // DW_AT_mutable
712 
713 private:
714 			DIEType*			fType;
715 			DynamicAttributeValue fByteSize;
716 			DynamicAttributeValue fBitOffset;
717 			DynamicAttributeValue fDataBitOffset;
718 			DynamicAttributeValue fBitSize;
719 			MemberLocation		fLocation;
720 };
721 
722 
723 class DIEPointerType : public DIEAddressingType {
724 public:
725 								DIEPointerType();
726 
727 	virtual	uint16				Tag() const;
728 
729 	virtual	DebugInfoEntry*		Specification() const;
730 
731 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
732 									const AttributeValue& value);
733 
734 private:
735 			DIEPointerType*		fSpecification;
736 };
737 
738 
739 class DIEReferenceType : public DIEAddressingType {
740 public:
741 								DIEReferenceType();
742 
743 	virtual	uint16				Tag() const;
744 };
745 
746 
747 class DIECompileUnit : public DIECompileUnitBase {
748 public:
749 								DIECompileUnit();
750 
751 	virtual	uint16				Tag() const;
752 };
753 
754 
755 class DIEStringType : public DIEDeclaredType {
756 public:
757 								DIEStringType();
758 
759 	virtual	uint16				Tag() const;
760 
761 	virtual	const DynamicAttributeValue* ByteSize() const;
762 
763 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
764 									const AttributeValue& value);
765 
766 private:
767 			DynamicAttributeValue fByteSize;
768 // TODO:
769 // DW_AT_string_length
770 };
771 
772 
773 class DIEStructureType : public DIEClassBaseType {
774 public:
775 								DIEStructureType();
776 
777 	virtual	uint16				Tag() const;
778 };
779 
780 
781 class DIESubroutineType : public DIEDeclaredType {
782 public:
783 								DIESubroutineType();
784 
785 	virtual	uint16				Tag() const;
786 
ReturnType()787 			DIEType*			ReturnType() const	{ return fReturnType; }
788 
Parameters()789 			const DebugInfoEntryList& Parameters() const { return fParameters; }
790 
791 	virtual	status_t			AddChild(DebugInfoEntry* child);
792 
793 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
794 									const AttributeValue& value);
795 	virtual	status_t			AddAttribute_prototyped(uint16 attributeName,
796 									const AttributeValue& value);
797 	virtual	status_t			AddAttribute_type(uint16 attributeName,
798 									const AttributeValue& value);
799 
800 protected:
801 			DebugInfoEntryList	fParameters;
802 			DIEType*			fReturnType;
803 			uint8				fAddressClass;
804 			bool				fPrototyped;
805 };
806 
807 
808 class DIETypedef : public DIEDerivedType {
809 public:
810 								DIETypedef();
811 
812 	virtual	uint16				Tag() const;
813 };
814 
815 
816 class DIEUnionType : public DIECompoundType {
817 public:
818 								DIEUnionType();
819 
820 	virtual	uint16				Tag() const;
821 };
822 
823 
824 class DIEUnspecifiedParameters : public DIEDeclaredBase {
825 public:
826 								DIEUnspecifiedParameters();
827 
828 	virtual	uint16				Tag() const;
829 
830 // TODO:
831 // DW_AT_abstract_origin
832 // DW_AT_artificial
833 };
834 
835 
836 class DIEVariant : public DIEDeclaredBase {
837 public:
838 								DIEVariant();
839 
840 	virtual	uint16				Tag() const;
841 
842 // TODO:
843 // DW_AT_accessibility
844 // DW_AT_abstract_origin
845 // DW_AT_declaration
846 // DW_AT_discr_list
847 // DW_AT_discr_value
848 };
849 
850 
851 class DIECommonBlock : public DIEDeclaredNamedBase {
852 public:
853 								DIECommonBlock();
854 
855 	virtual	uint16				Tag() const;
856 
857 	virtual	LocationDescription* GetLocationDescription();
858 
859 // TODO:
860 // DW_AT_segment
861 
862 private:
863 			LocationDescription	fLocationDescription;
864 };
865 
866 
867 class DIECommonInclusion : public DIEDeclaredBase {
868 public:
869 								DIECommonInclusion();
870 
871 	virtual	uint16				Tag() const;
872 
873 // TODO:
874 // DW_AT_common_reference
875 // DW_AT_declaration
876 // DW_AT_visibility
877 
878 };
879 
880 
881 class DIEInheritance : public DIEDeclaredBase {
882 public:
883 								DIEInheritance();
884 
885 	virtual	uint16				Tag() const;
886 
GetType()887 			DIEType*			GetType() const	{ return fType; }
Location()888 			const MemberLocation* Location() const
889 									{ return &fLocation; }
890 
891 	virtual	status_t			AddAttribute_type(uint16 attributeName,
892 									const AttributeValue& value);
893 	virtual	status_t			AddAttribute_data_member_location(
894 									uint16 attributeName,
895 									const AttributeValue& value);
896 
897 // TODO:
898 // DW_AT_accessibility
899 // DW_AT_virtuality
900 
901 private:
902 			DIEType*			fType;
903 			MemberLocation		fLocation;
904 };
905 
906 
907 class DIEInlinedSubroutine : public DebugInfoEntry {
908 public:
909 								DIEInlinedSubroutine();
910 
911 	virtual	uint16				Tag() const;
912 
913 // TODO:
914 // DW_AT_abstract_origin
915 // DW_AT_call_column
916 // DW_AT_call_file
917 // DW_AT_call_line
918 // DW_AT_entry_pc
919 // DW_AT_high_pc
920 // DW_AT_low_pc
921 // DW_AT_ranges
922 // DW_AT_return_addr
923 // DW_AT_segment
924 // DW_AT_start_scope
925 // DW_AT_trampoline
926 };
927 
928 
929 class DIEModule : public DIEDeclaredNamedBase {
930 public:
931 								DIEModule();
932 
933 	virtual	uint16				Tag() const;
934 
935 // TODO:
936 // DW_AT_entry_pc
937 // DW_AT_high_pc
938 // DW_AT_low_pc
939 // DW_AT_priority
940 // DW_AT_ranges
941 // DW_AT_segment
942 // DW_AT_specification
943 };
944 
945 
946 class DIEPointerToMemberType : public DIEDerivedType {
947 public:
948 								DIEPointerToMemberType();
949 
950 	virtual	uint16				Tag() const;
951 
ContainingType()952 			DIECompoundType*	ContainingType() const
953 									{ return fContainingType; }
954 
UseLocation()955 			const LocationDescription& UseLocation() const
956 									{ return fUseLocation; }
957 
958 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
959 									const AttributeValue& value);
960 	virtual	status_t			AddAttribute_containing_type(
961 									uint16 attributeName,
962 									const AttributeValue& value);
963 	virtual	status_t			AddAttribute_use_location(uint16 attributeName,
964 									const AttributeValue& value);
965 
966 protected:
967 			DIECompoundType*	fContainingType;
968 			LocationDescription	fUseLocation;
969 			uint8				fAddressClass;
970 };
971 
972 
973 class DIESetType : public DIEDerivedType {
974 public:
975 								DIESetType();
976 
977 	virtual	uint16				Tag() const;
978 
979 	virtual	const DynamicAttributeValue* ByteSize() const;
980 
981 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
982 									const AttributeValue& value);
983 
984 private:
985 			DynamicAttributeValue fByteSize;
986 };
987 
988 
989 class DIESubrangeType : public DIEArrayIndexType {
990 public:
991 								DIESubrangeType();
992 
993 	virtual	uint16				Tag() const;
994 
LowerBound()995 			const DynamicAttributeValue* LowerBound() const
996 									{ return &fLowerBound; }
UpperBound()997 			const DynamicAttributeValue* UpperBound() const
998 									{ return &fUpperBound; }
Count()999 			const DynamicAttributeValue* Count() const
1000 									{ return &fCount; }
1001 
1002 	virtual	status_t			AddAttribute_count(uint16 attributeName,
1003 									const AttributeValue& value);
1004 	virtual	status_t			AddAttribute_lower_bound(uint16 attributeName,
1005 									const AttributeValue& value);
1006 	virtual	status_t			AddAttribute_upper_bound(uint16 attributeName,
1007 									const AttributeValue& value);
1008 	virtual	status_t			AddAttribute_threads_scaled(
1009 									uint16 attributeName,
1010 									const AttributeValue& value);
1011 
1012 private:
1013 			DynamicAttributeValue fCount;
1014 			DynamicAttributeValue fLowerBound;
1015 			DynamicAttributeValue fUpperBound;
1016 			bool				fThreadsScaled;
1017 };
1018 
1019 
1020 class DIEWithStatement : public DebugInfoEntry {
1021 public:
1022 								DIEWithStatement();
1023 
1024 	virtual	uint16				Tag() const;
1025 
GetType()1026 			DIEType*			GetType() const	{ return fType; }
1027 
1028 	virtual	LocationDescription* GetLocationDescription();
1029 
1030 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1031 									const AttributeValue& value);
1032 
1033 // TODO:
1034 // DW_AT_accessibility
1035 // DW_AT_address_class
1036 // DW_AT_declaration
1037 // DW_AT_high_pc
1038 // DW_AT_low_pc
1039 // DW_AT_ranges
1040 // DW_AT_segment
1041 // DW_AT_visibility
1042 
1043 private:
1044 			DIEType*			fType;
1045 			LocationDescription	fLocationDescription;
1046 };
1047 
1048 
1049 class DIEAccessDeclaration : public DIEDeclaredNamedBase {
1050 public:
1051 								DIEAccessDeclaration();
1052 
1053 	virtual	uint16				Tag() const;
1054 };
1055 
1056 
1057 class DIEBaseType : public DIEType {
1058 public:
1059 								DIEBaseType();
1060 
1061 	virtual	uint16				Tag() const;
1062 
1063 	virtual	const DynamicAttributeValue* ByteSize() const;
BitOffset()1064 			const DynamicAttributeValue* BitOffset() const
1065 									{ return &fBitOffset; }
DataBitOffset()1066 			const DynamicAttributeValue* DataBitOffset() const
1067 									{ return &fDataBitOffset; }
BitSize()1068 			const DynamicAttributeValue* BitSize() const
1069 									{ return &fBitSize; }
Encoding()1070 			uint8				Encoding() const	{ return fEncoding; }
Endianity()1071 			uint8				Endianity() const	{ return fEndianity; }
1072 
1073 	virtual	status_t			AddAttribute_encoding(uint16 attributeName,
1074 									const AttributeValue& value);
1075 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
1076 									const AttributeValue& value);
1077 	virtual	status_t			AddAttribute_bit_size(uint16 attributeName,
1078 									const AttributeValue& value);
1079 	virtual	status_t			AddAttribute_bit_offset(uint16 attributeName,
1080 									const AttributeValue& value);
1081 	virtual	status_t			AddAttribute_data_bit_offset(
1082 									uint16 attributeName,
1083 									const AttributeValue& value);
1084 	virtual	status_t			AddAttribute_endianity(uint16 attributeName,
1085 									const AttributeValue& value);
1086 
1087 // TODO:
1088 // DW_AT_binary_scale
1089 // DW_AT_decimal_scale
1090 // DW_AT_decimal_sign
1091 // DW_AT_description
1092 // DW_AT_digit_count
1093 // DW_AT_picture_string
1094 // DW_AT_small
1095 
1096 private:
1097 			DynamicAttributeValue fByteSize;
1098 			DynamicAttributeValue fBitOffset;
1099 			DynamicAttributeValue fDataBitOffset;
1100 			DynamicAttributeValue fBitSize;
1101 			uint8				fEncoding;
1102 			uint8				fEndianity;
1103 };
1104 
1105 
1106 class DIECatchBlock : public DebugInfoEntry {
1107 public:
1108 								DIECatchBlock();
1109 
1110 	virtual	uint16				Tag() const;
1111 
1112 // TODO:
1113 // DW_AT_abstract_origin
1114 // DW_AT_high_pc
1115 // DW_AT_low_pc
1116 // DW_AT_ranges
1117 // DW_AT_segment
1118 };
1119 
1120 
1121 class DIEConstType : public DIEModifiedType {
1122 public:
1123 								DIEConstType();
1124 
1125 	virtual	uint16				Tag() const;
1126 };
1127 
1128 
1129 class DIEConstant : public DIEDeclaredNamedBase {
1130 public:
1131 								DIEConstant();
1132 
1133 	virtual	uint16				Tag() const;
1134 
GetType()1135 			DIEType*			GetType() const	{ return fType; }
1136 
ConstValue()1137 			const ConstantAttributeValue* ConstValue() const
1138 									{ return &fValue; }
1139 
1140 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1141 									const AttributeValue& value);
1142 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1143 									const AttributeValue& value);
1144 
1145 // TODO:
1146 // DW_AT_endianity
1147 // DW_AT_external
1148 // DW_AT_start_scope
1149 
1150 private:
1151 			DIEType*			fType;
1152 			ConstantAttributeValue fValue;
1153 };
1154 
1155 
1156 class DIEEnumerator : public DIEDeclaredNamedBase {
1157 public:
1158 								DIEEnumerator();
1159 
1160 	virtual	uint16				Tag() const;
1161 
ConstValue()1162 			const ConstantAttributeValue* ConstValue() const
1163 									{ return &fValue; }
1164 
1165 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1166 									const AttributeValue& value);
1167 
1168 private:
1169 			ConstantAttributeValue fValue;
1170 };
1171 
1172 
1173 class DIEFileType : public DIEDerivedType {
1174 public:
1175 								DIEFileType();
1176 
1177 	virtual	uint16				Tag() const;
1178 
1179 	virtual	const DynamicAttributeValue* ByteSize() const;
1180 
1181 	virtual	status_t			AddAttribute_byte_size(uint16 attributeName,
1182 									const AttributeValue& value);
1183 
1184 private:
1185 			DynamicAttributeValue fByteSize;
1186 };
1187 
1188 
1189 class DIEFriend : public DIEDeclaredBase {
1190 public:
1191 								DIEFriend();
1192 
1193 	virtual	uint16				Tag() const;
1194 
1195 // TODO:
1196 // DW_AT_abstract_origin
1197 // DW_AT_friend
1198 };
1199 
1200 
1201 class DIENameList : public DIEDeclaredNamedBase {
1202 public:
1203 								DIENameList();
1204 
1205 	virtual	uint16				Tag() const;
1206 
1207 // TODO:
1208 // DW_AT_abstract_origin
1209 };
1210 
1211 
1212 class DIENameListItem : public DIEDeclaredBase {
1213 public:
1214 								DIENameListItem();
1215 
1216 	virtual	uint16				Tag() const;
1217 
1218 // TODO:
1219 // DW_AT_namelist_item
1220 };
1221 
1222 
1223 class DIENamespace : public DIEDeclaredNamedBase {
1224 public:
1225 								DIENamespace();
1226 
1227 	virtual	uint16				Tag() const;
1228 
1229 	virtual	bool				IsNamespace() const;
1230 
Children()1231 			const DebugInfoEntryList& Children() const
1232 										{ return fChildren; }
1233 
1234 	virtual	status_t			AddChild(DebugInfoEntry* child);
1235 
1236 private:
1237 			DebugInfoEntryList	fChildren;
1238 
1239 // TODO:
1240 // DW_AT_extension
1241 // DW_AT_start_scope
1242 };
1243 
1244 
1245 class DIEPackedType : public DIEModifiedType {
1246 public:
1247 								DIEPackedType();
1248 
1249 	virtual	uint16				Tag() const;
1250 };
1251 
1252 
1253 class DIESubprogram : public DIENamespace {
1254 public:
1255 								DIESubprogram();
1256 								~DIESubprogram();
1257 
1258 	virtual	uint16				Tag() const;
1259 
1260 	virtual	DebugInfoEntry*		Specification() const;
1261 	virtual	DebugInfoEntry*		AbstractOrigin() const;
1262 
AddressRangesOffset()1263 			off_t				AddressRangesOffset() const
1264 										{ return fAddressRangesOffset; }
1265 
LowPC()1266 			target_addr_t		LowPC() const	{ return fLowPC; }
HighPC()1267 			target_addr_t		HighPC() const	{ return fHighPC; }
1268 
FrameBase()1269 			const LocationDescription* FrameBase() const { return &fFrameBase; }
1270 
Parameters()1271 			const DebugInfoEntryList Parameters() const	{ return fParameters; }
Variables()1272 			const DebugInfoEntryList Variables() const	{ return fVariables; }
Blocks()1273 			const DebugInfoEntryList Blocks() const		{ return fBlocks; }
TemplateTypeParameters()1274 			const DebugInfoEntryList TemplateTypeParameters() const
1275 										{ return fTemplateTypeParameters; }
TemplateValueParameters()1276 			const DebugInfoEntryList TemplateValueParameters() const
1277 										{ return fTemplateValueParameters; }
CallSites()1278 			const DebugInfoEntryList CallSites() const
1279 										{ return fCallSites; }
1280 
IsPrototyped()1281 			bool				IsPrototyped() const	{ return fPrototyped; }
Inline()1282 			uint8				Inline() const			{ return fInline; }
IsArtificial()1283 			bool				IsArtificial() const	{ return fArtificial; }
CallingConvention()1284 			uint8				CallingConvention() const
1285 										{ return fCallingConvention; }
IsMain()1286 			bool				IsMain() const			{ return fMain; }
1287 
ReturnType()1288 			DIEType*			ReturnType() const		{ return fReturnType; }
1289 
1290 	virtual	status_t			AddChild(DebugInfoEntry* child);
1291 
1292 	virtual	status_t			AddAttribute_low_pc(uint16 attributeName,
1293 									const AttributeValue& value);
1294 	virtual	status_t			AddAttribute_high_pc(uint16 attributeName,
1295 									const AttributeValue& value);
1296 	virtual	status_t			AddAttribute_ranges(uint16 attributeName,
1297 									const AttributeValue& value);
1298 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
1299 									const AttributeValue& value);
1300 	virtual	status_t			AddAttribute_address_class(uint16 attributeName,
1301 									const AttributeValue& value);
1302 	virtual	status_t			AddAttribute_prototyped(uint16 attributeName,
1303 									const AttributeValue& value);
1304 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1305 									const AttributeValue& value);
1306 	virtual	status_t			AddAttribute_inline(uint16 attributeName,
1307 									const AttributeValue& value);
1308 	virtual	status_t			AddAttribute_abstract_origin(
1309 									uint16 attributeName,
1310 									const AttributeValue& value);
1311 	virtual	status_t			AddAttribute_frame_base(
1312 									uint16 attributeName,
1313 									const AttributeValue& value);
1314 	virtual	status_t			AddAttribute_artificial(
1315 									uint16 attributeName,
1316 									const AttributeValue& value);
1317 	virtual status_t			AddAttribute_calling_convention(
1318 									uint16 attributeName,
1319 									const AttributeValue& value);
1320 	virtual	status_t			AddAttribute_main_subprogram(
1321 									uint16 attributeName,
1322 									const AttributeValue& value);
1323 
1324 
1325 protected:
1326 			DebugInfoEntryList	fParameters;
1327 			DebugInfoEntryList	fVariables;
1328 			DebugInfoEntryList	fBlocks;
1329 			DebugInfoEntryList	fTemplateTypeParameters;
1330 			DebugInfoEntryList	fTemplateValueParameters;
1331 			DebugInfoEntryList	fCallSites;
1332 			target_addr_t		fLowPC;
1333 			target_addr_t		fHighPC;
1334 			off_t				fAddressRangesOffset;
1335 			DIESubprogram*		fSpecification;
1336 			DIESubprogram*		fAbstractOrigin;
1337 			DIEType*			fReturnType;
1338 			LocationDescription	fFrameBase;
1339 			uint8				fAddressClass;
1340 			bool				fPrototyped;
1341 			uint8				fInline;
1342 			bool				fMain;
1343 			bool				fArtificial;
1344 			uint8				fCallingConvention;
1345 
1346 // TODO:
1347 // DW_AT_elemental
1348 // DW_AT_entry_pc
1349 // DW_AT_explicit
1350 // DW_AT_external
1351 // DW_AT_object_pointer
1352 // DW_AT_pure
1353 // DW_AT_recursive
1354 // DW_AT_return_addr
1355 // DW_AT_segment
1356 // DW_AT_start_scope
1357 // DW_AT_static_link
1358 // DW_AT_trampoline
1359 // DW_AT_virtuality
1360 // DW_AT_vtable_elem_location
1361 };
1362 
1363 
1364 class DIETemplateTypeParameter : public DIEDeclaredNamedBase {
1365 public:
1366 								DIETemplateTypeParameter();
1367 
1368 	virtual	uint16				Tag() const;
1369 
GetType()1370 			DIEType*			GetType() const	{ return fType; }
1371 
1372 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1373 									const AttributeValue& value);
1374 
1375 private:
1376 			DIEType*			fType;
1377 };
1378 
1379 
1380 class DIETemplateValueParameter : public DIEDeclaredNamedBase {
1381 public:
1382 								DIETemplateValueParameter();
1383 
1384 	virtual	uint16				Tag() const;
1385 
GetType()1386 			DIEType*			GetType() const	{ return fType; }
1387 
ConstValue()1388 			const ConstantAttributeValue* ConstValue() const
1389 									{ return &fValue; }
1390 
1391 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1392 									const AttributeValue& value);
1393 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1394 									const AttributeValue& value);
1395 
1396 private:
1397 			DIEType*			fType;
1398 			ConstantAttributeValue fValue;
1399 };
1400 
1401 
1402 class DIEThrownType : public DIEDeclaredBase {
1403 public:
1404 								DIEThrownType();
1405 
1406 	virtual	uint16				Tag() const;
1407 
GetType()1408 			DIEType*			GetType() const	{ return fType; }
1409 
1410 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1411 									const AttributeValue& value);
1412 
1413 // TODO:
1414 // DW_AT_allocated
1415 // DW_AT_associated
1416 // DW_AT_data_location
1417 
1418 private:
1419 			DIEType*			fType;
1420 };
1421 
1422 
1423 class DIETryBlock : public DebugInfoEntry {
1424 public:
1425 								DIETryBlock();
1426 
1427 	virtual	uint16				Tag() const;
1428 
1429 // TODO:
1430 // DW_AT_abstract_origin
1431 // DW_AT_high_pc
1432 // DW_AT_low_pc
1433 // DW_AT_ranges
1434 // DW_AT_segment
1435 };
1436 
1437 
1438 class DIEVariantPart : public DIEDeclaredBase {
1439 public:
1440 								DIEVariantPart();
1441 
1442 	virtual	uint16				Tag() const;
1443 
GetType()1444 			DIEType*			GetType() const	{ return fType; }
1445 
1446 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1447 									const AttributeValue& value);
1448 
1449 // TODO:
1450 // DW_AT_abstract_origin
1451 // DW_AT_accessibility
1452 // DW_AT_declaration
1453 // DW_AT_discr
1454 
1455 private:
1456 			DIEType*			fType;
1457 };
1458 
1459 
1460 class DIEVariable : public DIEDeclaredNamedBase {
1461 public:
1462 								DIEVariable();
1463 
1464 	virtual	uint16				Tag() const;
1465 
1466 	virtual	DebugInfoEntry*		Specification() const;
1467 	virtual	DebugInfoEntry*		AbstractOrigin() const;
1468 
1469 	virtual	LocationDescription* GetLocationDescription();
1470 
GetType()1471 			DIEType*			GetType() const	{ return fType; }
1472 
ConstValue()1473 			const ConstantAttributeValue* ConstValue() const
1474 									{ return &fValue; }
1475 
StartScope()1476 			uint64				StartScope() const	{ return fStartScope; }
1477 
IsExternal()1478 			bool				IsExternal() const	{ return fIsExternal; }
1479 
1480 	virtual	status_t			AddAttribute_const_value(uint16 attributeName,
1481 									const AttributeValue& value);
1482 	virtual	status_t			AddAttribute_type(uint16 attributeName,
1483 									const AttributeValue& value);
1484 	virtual	status_t			AddAttribute_specification(uint16 attributeName,
1485 									const AttributeValue& value);
1486 	virtual	status_t			AddAttribute_abstract_origin(
1487 									uint16 attributeName,
1488 									const AttributeValue& value);
1489 	virtual	status_t			AddAttribute_start_scope(
1490 									uint16 attributeName,
1491 									const AttributeValue& value);
1492 	virtual	status_t			AddAttribute_external(
1493 									uint16 attributeName,
1494 									const AttributeValue& value);
1495 
1496 // TODO:
1497 // DW_AT_endianity
1498 // DW_AT_segment
1499 
1500 private:
1501 			LocationDescription	fLocationDescription;
1502 			ConstantAttributeValue fValue;
1503 			DIEType*			fType;
1504 			DebugInfoEntry*		fSpecification;
1505 			DIEVariable*		fAbstractOrigin;
1506 			uint64				fStartScope;
1507 			bool				fIsExternal;
1508 };
1509 
1510 
1511 class DIEVolatileType : public DIEModifiedType {
1512 public:
1513 								DIEVolatileType();
1514 
1515 	virtual	uint16				Tag() const;
1516 
1517 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1518 									const AttributeValue& value);
1519 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1520 									const AttributeValue& value);
1521 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1522 									const AttributeValue& value);
1523 
1524 private:
1525 			DeclarationLocation	fDeclarationLocation;
1526 };
1527 
1528 
1529 class DIEDwarfProcedure : public DebugInfoEntry {
1530 public:
1531 								DIEDwarfProcedure();
1532 
1533 	virtual	uint16				Tag() const;
1534 
1535 	virtual	LocationDescription* GetLocationDescription();
1536 
1537 private:
1538 			LocationDescription	fLocationDescription;
1539 };
1540 
1541 
1542 class DIERestrictType : public DIEModifiedType {
1543 public:
1544 								DIERestrictType();
1545 
1546 	virtual	uint16				Tag() const;
1547 };
1548 
1549 
1550 class DIEInterfaceType : public DIEClassBaseType {
1551 public:
1552 								DIEInterfaceType();
1553 
1554 	virtual	uint16				Tag() const;
1555 };
1556 
1557 
1558 class DIEImportedModule : public DIEDeclaredBase {
1559 public:
1560 								DIEImportedModule();
1561 
1562 	virtual	uint16				Tag() const;
1563 
1564 // TODO:
1565 // DW_AT_import
1566 // DW_AT_start_scope
1567 };
1568 
1569 
1570 class DIEUnspecifiedType : public DIEType {
1571 public:
1572 								DIEUnspecifiedType();
1573 
1574 	virtual	uint16				Tag() const;
1575 
1576 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1577 									const AttributeValue& value);
1578 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1579 									const AttributeValue& value);
1580 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1581 									const AttributeValue& value);
1582 
1583 // TODO:
1584 // DW_AT_description
1585 
1586 private:
1587 			DeclarationLocation	fDeclarationLocation;
1588 };
1589 
1590 
1591 class DIEPartialUnit : public DIECompileUnitBase {
1592 public:
1593 								DIEPartialUnit();
1594 
1595 	virtual	uint16				Tag() const;
1596 
1597 // TODO:
1598 // DW_AT_description
1599 };
1600 
1601 
1602 class DIEImportedUnit : public DebugInfoEntry {
1603 public:
1604 								DIEImportedUnit();
1605 
1606 	virtual	uint16				Tag() const;
1607 
1608 // TODO:
1609 // DW_AT_import
1610 };
1611 
1612 
1613 class DIECondition : public DIEDeclaredNamedBase {
1614 public:
1615 								DIECondition();
1616 
1617 	virtual	uint16				Tag() const;
1618 };
1619 
1620 
1621 class DIESharedType : public DIEModifiedType {
1622 public:
1623 								DIESharedType();
1624 
1625 	virtual	uint16				Tag() const;
1626 
1627 	virtual	status_t			AddAttribute_count(uint16 attributeName,
1628 									const AttributeValue& value);
1629 	virtual	status_t			AddAttribute_decl_file(uint16 attributeName,
1630 									const AttributeValue& value);
1631 	virtual	status_t			AddAttribute_decl_line(uint16 attributeName,
1632 									const AttributeValue& value);
1633 	virtual	status_t			AddAttribute_decl_column(uint16 attributeName,
1634 									const AttributeValue& value);
1635 
1636 private:
1637 			DynamicAttributeValue fBlockSize;
1638 			DeclarationLocation	fDeclarationLocation;
1639 };
1640 
1641 
1642 class DIETypeUnit : public DIECompileUnitBase {
1643 public:
1644 								DIETypeUnit();
1645 
1646 	virtual	uint16				Tag() const;
1647 };
1648 
1649 
1650 class DIERValueReferenceType : public DIEReferenceType {
1651 public:
1652 								DIERValueReferenceType();
1653 
1654 	virtual	uint16				Tag() const;
1655 };
1656 
1657 
1658 class DIETemplateTemplateParameter : public DIEDeclaredBase {
1659 public:
1660 								DIETemplateTemplateParameter();
1661 
1662 	virtual	uint16				Tag() const;
1663 
1664 	virtual	const char*			Name() const;
1665 
1666 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1667 									const AttributeValue& value);
1668 
1669 private:
1670 			const char*			fName;
1671 };
1672 
1673 
1674 class DIETemplateTypeParameterPack : public DIEDeclaredBase {
1675 public:
1676 								DIETemplateTypeParameterPack();
1677 
1678 	virtual	uint16				Tag() const;
1679 
1680 	virtual	const char*			Name() const;
1681 
1682 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1683 									const AttributeValue& value);
1684 
Children()1685 			const DebugInfoEntryList& Children() const
1686 										{ return fChildren; }
1687 
1688 	virtual	status_t			AddChild(DebugInfoEntry* child);
1689 
1690 private:
1691 			const char*			fName;
1692 			DebugInfoEntryList	fChildren;
1693 };
1694 
1695 
1696 class DIETemplateValueParameterPack : public DIEDeclaredBase {
1697 public:
1698 								DIETemplateValueParameterPack();
1699 
1700 	virtual	uint16				Tag() const;
1701 
1702 	virtual	const char*			Name() const;
1703 
1704 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1705 									const AttributeValue& value);
1706 
Children()1707 			const DebugInfoEntryList& Children() const
1708 										{ return fChildren; }
1709 
1710 	virtual	status_t			AddChild(DebugInfoEntry* child);
1711 
1712 private:
1713 			const char*			fName;
1714 			DebugInfoEntryList	fChildren;
1715 };
1716 
1717 
1718 class DIECallSite : public DIEDeclaredBase {
1719 public:
1720 								DIECallSite();
1721 
1722 	virtual	uint16				Tag() const;
1723 
1724 	virtual	const char*			Name() const;
1725 
1726 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1727 									const AttributeValue& value);
1728 
Children()1729 			const DebugInfoEntryList& Children() const
1730 										{ return fChildren; }
1731 
1732 	virtual	status_t			AddChild(DebugInfoEntry* child);
1733 
1734 private:
1735 			const char*			fName;
1736 			DebugInfoEntryList	fChildren;
1737 };
1738 
1739 
1740 class DIECallSiteParameter : public DIEDeclaredBase {
1741 public:
1742 								DIECallSiteParameter();
1743 
1744 	virtual	uint16				Tag() const;
1745 
1746 	virtual	const char*			Name() const;
1747 
1748 	virtual	status_t			AddAttribute_name(uint16 attributeName,
1749 									const AttributeValue& value);
1750 
Children()1751 			const DebugInfoEntryList& Children() const
1752 										{ return fChildren; }
1753 
1754 	virtual	status_t			AddChild(DebugInfoEntry* child);
1755 
1756 private:
1757 			const char*			fName;
1758 			DebugInfoEntryList	fChildren;
1759 };
1760 
1761 
1762 // #pragma mark - DebugInfoEntryFactory
1763 
1764 
1765 class DebugInfoEntryFactory {
1766 public:
1767 								DebugInfoEntryFactory();
1768 
1769 			status_t			CreateDebugInfoEntry(uint16 tag,
1770 									DebugInfoEntry*& entry);
1771 };
1772 
1773 
1774 #endif	// DEBUG_INFO_ENTRIES_H
1775