ROSE 0.11.145.247
SgAsmDOSFileHeader.h
1
2#ifndef ROSE_SgAsmDOSFileHeader_H
3#define ROSE_SgAsmDOSFileHeader_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmGenericHeader.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmDOSFileHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
25/* #line 28632 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28
29
30/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
31
32/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
33
34#if !defined(DOCUMENTATION)
35// Class Definition for SgAsmDOSFileHeader
36class ROSE_DLL_API SgAsmDOSFileHeader : public SgAsmGenericHeader
37 {
38 public:
39
40
41/* #line 42 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
42
43 virtual SgNode* copy ( SgCopyHelp& help) const override;
44// Start of memberFunctionString
45/* #line 28741 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
46
47
48 //----------------------- Boost serialization for SgAsmDOSFileHeader -----------------------
49#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
50private:
51 friend class boost::serialization::access;
52
53 template<class S>
54 void serialize(S &s, const unsigned /*version*/) {
55 debugSerializationBegin("SgAsmDOSFileHeader");
56 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
57 s & BOOST_SERIALIZATION_NVP(p_e_last_page_size);
58 s & BOOST_SERIALIZATION_NVP(p_e_total_pages);
59 s & BOOST_SERIALIZATION_NVP(p_e_nrelocs);
60 s & BOOST_SERIALIZATION_NVP(p_e_header_paragraphs);
61 s & BOOST_SERIALIZATION_NVP(p_e_minalloc);
62 s & BOOST_SERIALIZATION_NVP(p_e_maxalloc);
63 s & BOOST_SERIALIZATION_NVP(p_e_ss);
64 s & BOOST_SERIALIZATION_NVP(p_e_sp);
65 s & BOOST_SERIALIZATION_NVP(p_e_cksum);
66 s & BOOST_SERIALIZATION_NVP(p_e_ip);
67 s & BOOST_SERIALIZATION_NVP(p_e_cs);
68 s & BOOST_SERIALIZATION_NVP(p_e_overlay);
69 s & BOOST_SERIALIZATION_NVP(p_e_relocs_offset);
70 s & BOOST_SERIALIZATION_NVP(p_e_res1);
71 s & BOOST_SERIALIZATION_NVP(p_relocs);
72 s & BOOST_SERIALIZATION_NVP(p_rm_section);
73 debugSerializationEnd("SgAsmDOSFileHeader");
74 }
75#endif // ROSE_ENABLE_BOOST_SERIALIZATION
77 // Local types
79public:
80#ifdef _MSC_VER
81# pragma pack (1)
82#endif
84 struct DOSFileHeader_disk {
85 unsigned char e_magic[2];
86 uint16_t e_last_page_size; //
88 uint16_t e_total_pages;
89 uint16_t e_nrelocs;
90 uint16_t e_header_paragraphs;
91 uint16_t e_minalloc;
92 uint16_t e_maxalloc;
93 uint16_t e_ss;
94 uint16_t e_sp;
95 uint16_t e_cksum;
97 uint16_t e_ip;
98 uint16_t e_cs;
99 uint16_t e_relocs_offset;
100 uint16_t e_overlay;
101 uint32_t e_res1;
102 } /* 0x20 */
103#if !defined(SWIG) && !defined(_MSC_VER)
104 __attribute__((packed))
105#endif
106 ;
107
108 struct DOSRelocEntry_disk {
109 uint16_t offset; /* 0x00 */
110 uint16_t segment; /* 0x02 */
111 } /* 0x04 */
112#if !defined(SWIG) && !defined(_MSC_VER)
113 __attribute__((packed))
114#endif
115 ;
116
117#ifdef _MSC_VER
118# pragma pack ()
119#endif
120
122 // Properties
124public:
125public:
131 uint16_t const& get_e_last_page_size() const;
132 void set_e_last_page_size(uint16_t const&);
135public:
141 uint16_t const& get_e_total_pages() const;
142 void set_e_total_pages(uint16_t const&);
145public:
151 uint16_t const& get_e_nrelocs() const;
152 void set_e_nrelocs(uint16_t const&);
155public:
161 uint16_t const& get_e_header_paragraphs() const;
162 void set_e_header_paragraphs(uint16_t const&);
165public:
171 uint16_t const& get_e_minalloc() const;
172 void set_e_minalloc(uint16_t const&);
175public:
181 uint16_t const& get_e_maxalloc() const;
182 void set_e_maxalloc(uint16_t const&);
185public:
191 uint16_t const& get_e_ss() const;
192 void set_e_ss(uint16_t const&);
195public:
201 uint16_t const& get_e_sp() const;
202 void set_e_sp(uint16_t const&);
205public:
211 uint16_t const& get_e_cksum() const;
212 void set_e_cksum(uint16_t const&);
215public:
221 uint16_t const& get_e_ip() const;
222 void set_e_ip(uint16_t const&);
225public:
231 uint16_t const& get_e_cs() const;
232 void set_e_cs(uint16_t const&);
235public:
241 uint16_t const& get_e_overlay() const;
242 void set_e_overlay(uint16_t const&);
245public:
251 Rose::BinaryAnalysis::Address const& get_e_relocs_offset() const;
252 void set_e_relocs_offset(Rose::BinaryAnalysis::Address const&);
255public:
261 unsigned const& get_e_res1() const;
262 void set_e_res1(unsigned const&);
265public:
269 SgAsmGenericSection* const& get_relocs() const;
270 void set_relocs(SgAsmGenericSection* const&);
273public:
277 SgAsmGenericSection* const& get_rm_section() const;
278 void set_rm_section(SgAsmGenericSection* const&);
281 // Functions
283public:
285 virtual SgAsmDOSFileHeader *parse() override {return parse(true);}
286 SgAsmDOSFileHeader *parse(bool define_rm_section);
287 virtual bool reallocate() override;
288 virtual void unparse(std::ostream&) const override;
289 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
290 virtual const char *formatName() const override;
291
297 SgAsmGenericSection *parseRealModeSection(Rose::BinaryAnalysis::Address max_offset=0);
298
304 void updateFromRealModeSection();
305
307 static bool isDos(SgAsmGenericFile*);
308
309private:
310 void *encode(SgAsmDOSFileHeader::DOSFileHeader_disk*) const;
311
313 // Deprecated 2023-11
315public:
316 virtual const char* format_name() const override ROSE_DEPRECATED("use formatName");
317 SgAsmGenericSection* parse_rm_section(Rose::BinaryAnalysis::Address max_offset = 0) ROSE_DEPRECATED("use parseRealModeSection");
318 void update_from_rm_section() ROSE_DEPRECATED("use updateFromRealModeSection");
319 static bool is_DOS(SgAsmGenericFile*) ROSE_DEPRECATED("use isDos");
320public:
322 virtual ~SgAsmDOSFileHeader();
323
324public:
327
328protected:
335 void initializeProperties();
336
337
338// End of memberFunctionString
339// Start of memberFunctionString
340/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
341
342// *** COMMON CODE SECTION BEGINS HERE ***
343
344 public:
345
346 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
347 // and not required which is required to match the other aspects of the copy mechanism code generation.
348 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
349 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
350 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
351 // virtual SgNode* copy ( const SgCopyHelp & help) const;
352
354 virtual std::string class_name() const override;
355
357 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
358
360 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
361 // static const VariantT static_variant = V_SgAsmDOSFileHeader;
362 enum { static_variant = V_SgAsmDOSFileHeader };
363
364 /* the generated cast function */
366 ROSE_DLL_API friend SgAsmDOSFileHeader* isSgAsmDOSFileHeader( SgNode * s );
367
369 ROSE_DLL_API friend const SgAsmDOSFileHeader* isSgAsmDOSFileHeader( const SgNode * s );
370
371 // ******************************************
372 // * Memory Pool / New / Delete
373 // ******************************************
374
375 public:
377 static const unsigned pool_size; //
379 static std::vector<unsigned char *> pools; //
381 static SgAsmDOSFileHeader * next_node; //
382
384 static unsigned long initializeStorageClassArray(SgAsmDOSFileHeaderStorageClass *); //
385
387 static void clearMemoryPool(); //
388 static void deleteMemoryPool(); //
389
391 static void extendMemoryPoolForFileIO(); //
392
394 static SgAsmDOSFileHeader * getPointerFromGlobalIndex(unsigned long); //
396 static SgAsmDOSFileHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
397
399 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
401 static void resetValidFreepointers(); //
403 static unsigned long getNumberOfLastValidPointer(); //
404
405
406#if defined(INLINE_FUNCTIONS)
408 inline void *operator new (size_t size);
409#else
411 void *operator new (size_t size);
412#endif
414 void operator delete (void* pointer, size_t size);
415
416 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
417 void operator delete (void* pointer)
418 {
419 // This is the generated delete operator...
420 SgAsmDOSFileHeader::operator delete (pointer,sizeof(SgAsmDOSFileHeader));
421 }
422
424 static size_t numberOfNodes();
425
427 static size_t memoryUsage();
428
429 // End of scope which started in IR nodes specific code
430 /* */
431
432 /* name Internal Functions
433 \brief Internal functions ... incomplete-documentation
434
435 These functions have been made public as part of the design, but they are suggested for internal use
436 or by particularly knowledgeable users for specialized tools or applications.
437
438 \internal We could not make these private because they are required by user for special purposes. And
439 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
440
441 */
442
443 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
444 // overridden in every class by *generated* implementation
446 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
447 // MS: 06/28/02 container of names of variables or container indices
448 // used used in the traversal to access AST successor nodes
449 // overridden in every class by *generated* implementation
452 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
453
454 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
455 // than all the vector copies. The implementation for these functions is generated for each class.
457 virtual size_t get_numberOfTraversalSuccessors() const override;
459 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
461 virtual size_t get_childIndex(SgNode *child) const override;
462
463#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
464 // MS: 08/16/2002 method for generating RTI information
466 virtual RTIReturnType roseRTI() override;
467#endif
468 /* */
469
470
471
472 /* name Deprecated Functions
473 \brief Deprecated functions ... incomplete-documentation
474
475 These functions have been deprecated from use.
476 */
477 /* */
478
480 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
481
482 // JJW (10/16/2008): Changed to a single function in Node.code, and put
483 // getVariant() in #if 0 block to prevent confusing Doxygen
484#if 0
486 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
488 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
489#endif
490 /* */
491
492
493
494
495 public:
496 /* name Traversal Support Functions
497 \brief Traversal support functions ... incomplete-documentation
498
499 These functions have been made public as part of the design, but they are suggested for internal use
500 or by particularly knowledgable users for specialized tools or applications.
501 */
502 /* */
503
504 // DQ (11/26/2005): Support for visitor pattern mechanims
505 // (inferior to ROSE traversal mechanism, experimental).
509
510 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
512 virtual void accept (ROSE_VisitorPattern & visitor) override;
513
514 // DQ (12/26/2005): Support for traversal based on the memory pool
517 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
518
522
523 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
524 // This traversal helps support internal tools that call static member functions.
525 // note: this function operates on the memory pools.
528 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
529 /* */
530
531 public:
532 /* NodeId support functions */
534 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
537 static SgAsmDOSFileHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
540 static std::string getNodeIdString(SgAsmDOSFileHeader* sgnode);
541 static std::string getNodeIdStringInternal(SgAsmDOSFileHeader* sgnode);
542
543 public:
544 /* name Memory Allocation Functions
545 \brief Memory allocations functions ... incomplete-documentation
546
547 These functions have been made public as part of the design, but they are suggested for internal use
548 or by particularly knowledgable users for specialized tools or applications.
549 */
550 /* */
551
562 virtual bool isInMemoryPool() override;
563
574 virtual void checkDataMemberPointersIfInMemoryPool() override;
575
576 // DQ (4/30/2006): Modified to be a const function.
591 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
592
603
615 virtual long getChildIndex( SgNode* childNode ) const override;
616
617 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
618 // comment here (changed to be a C style comment and not be a doxygen comment).
619 /* \brief Constructor for use by AST File I/O Mechanism
620
621 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
622 which obtained via fast binary file I/O from disk.
623 */
624 // SgAsmDOSFileHeader( SgAsmDOSFileHeaderStorageClass& source );
625
626
627
628
629
630 // JH (10/24/2005): methods added to support the ast file IO
631 private:
632
633 /* name AST Memory Allocation Support Functions
634 \brief Memory allocations support....
635
636 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
637 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
638 and support the AST File I/O Mechanism.
639 */
640 /* */
641
642 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
643 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
644 that I use the same type everywhere, if any changes are made. THe second one declares the type
645 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
646 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
647 a correspinding one in the AST_FILE_IO class!
648 */
649 // DQ (9/2/2015): This typedef is no longer used, we can't define the
650 // comment here (changed to be a C style comment and not be a doxygen comment).
651 /* \brief Typedef used for low level memory access.
652 */
653 // typedef unsigned char* TestType;
654
655 // DQ (9/2/2015): This typedef is no longer used, we can't define the
656 // comment here (changed to be a C style comment and not be a doxygen comment).
657 /* \brief Typedef used to hold memory addresses as values.
658 */
659 // typedef unsigned long AddressType;
660
661
662
663 // necessary, to have direct access to the p_freepointer and the private methods !
665 friend class AST_FILE_IO;
666
668 friend class SgAsmDOSFileHeaderStorageClass;
669
671 friend class AstSpecificDataManagingClass;
672
674 friend class AstSpecificDataManagingClassStorageClass;
675 public:
677 SgAsmDOSFileHeader( const SgAsmDOSFileHeaderStorageClass& source );
678
679 // private: // JJW hack
680 /*
681 name AST Memory Allocation Support Variables
682 Memory allocations support variables
683
684 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
685 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
686 and support the AST File I/O Mechanism.
687 */
688 /* */
689
690 public:
691
692 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
693 // to current node (so that it will work cleanly with build functions to specify patterns).
694 // virtual SgNode* addRegExpAttribute();
701
702#ifndef _MSC_VER
703// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
704// and likely never fully implemented nor tested. Files remain in the src tree but are no
705// longer built.
706#define BUILD_ATERM_SUPPORT 0
707 #if BUILD_ATERM_SUPPORT
708 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
709 // DQ (10/4/2014): Adding ATerm support to ROSE.
719 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
720 virtual ATerm generate_ATerm() override;
721
723 virtual void generate_ATerm_Annotation(ATerm & term) override;
724 #endif
725 #endif // BUILD_ATERM_SUPPORT
726#endif
727 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
728 // virtual generate_AST(ATerm & term);
729 // virtual void read_ATerm_Annotation(ATerm & term);
730
731// *** COMMON CODE SECTION ENDS HERE ***
732
733
734// End of memberFunctionString
735// Start of memberFunctionString
736/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
737
738 // the generated cast function
739 // friend ROSE_DLL_API SgAsmDOSFileHeader* isSgAsmDOSFileHeader ( SgNode* s );
740
741 typedef SgAsmGenericHeader base_node_type;
742
743
744// End of memberFunctionString
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762 protected:
763// Start of memberFunctionString
764uint16_t p_e_last_page_size;
765
766// End of memberFunctionString
767// Start of memberFunctionString
768uint16_t p_e_total_pages;
769
770// End of memberFunctionString
771// Start of memberFunctionString
772uint16_t p_e_nrelocs;
773
774// End of memberFunctionString
775// Start of memberFunctionString
776uint16_t p_e_header_paragraphs;
777
778// End of memberFunctionString
779// Start of memberFunctionString
780uint16_t p_e_minalloc;
781
782// End of memberFunctionString
783// Start of memberFunctionString
784uint16_t p_e_maxalloc;
785
786// End of memberFunctionString
787// Start of memberFunctionString
788uint16_t p_e_ss;
789
790// End of memberFunctionString
791// Start of memberFunctionString
792uint16_t p_e_sp;
793
794// End of memberFunctionString
795// Start of memberFunctionString
796uint16_t p_e_cksum;
797
798// End of memberFunctionString
799// Start of memberFunctionString
800uint16_t p_e_ip;
801
802// End of memberFunctionString
803// Start of memberFunctionString
804uint16_t p_e_cs;
805
806// End of memberFunctionString
807// Start of memberFunctionString
808uint16_t p_e_overlay;
809
810// End of memberFunctionString
811// Start of memberFunctionString
812Rose::BinaryAnalysis::Address p_e_relocs_offset;
813
814// End of memberFunctionString
815// Start of memberFunctionString
816unsigned p_e_res1;
817
818// End of memberFunctionString
819// Start of memberFunctionString
820SgAsmGenericSection* p_relocs;
821
822// End of memberFunctionString
823// Start of memberFunctionString
824SgAsmGenericSection* p_rm_section;
825
826// End of memberFunctionString
827
829 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_last_page_size>;
830 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_total_pages>;
831 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_nrelocs>;
832 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_header_paragraphs>;
833 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_minalloc>;
834 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_maxalloc>;
835 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_ss>;
836 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_sp>;
837 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_cksum>;
838 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_ip>;
839 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_cs>;
840 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, uint16_t,&SgAsmDOSFileHeader::p_e_overlay>;
841 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, Rose::BinaryAnalysis::Address,&SgAsmDOSFileHeader::p_e_relocs_offset>;
842 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, unsigned,&SgAsmDOSFileHeader::p_e_res1>;
843 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, SgAsmGenericSection*,&SgAsmDOSFileHeader::p_relocs>;
844 friend struct Rose::Traits::generated::describe_field_t<SgAsmDOSFileHeader, SgAsmGenericSection*,&SgAsmDOSFileHeader::p_rm_section>;
845
846/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
847
848
849 };
850#endif
851
852// postdeclarations for SgAsmDOSFileHeader
853
854/* #line 855 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
855
856/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
857
858/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
859
860
861/* #line 862 "../../../src/frontend/SageIII//SgAsmDOSFileHeader.h" */
862
863#endif // ROSE_SgAsmDOSFileHeader_H
864
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents the file header for DOS executables.
Base class for binary files.
Base class for container file headers.
virtual const char * formatName() const
Returns the name of the file format.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const override
Print some debugging info.
virtual bool reallocate() override
Called prior to unparse to make things consistent.
virtual void unparse(std::ostream &) const override
Unparse headers and all they point to.
Contiguous region of a file.
virtual SgAsmGenericSection * parse()
Parse contents of the section.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
std::uint64_t Address
Address.
Definition Address.h:11
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
On-disk format of DOS file header.