Changeset 558cab8 in rtems-tools


Ignore:
Timestamp:
May 8, 2018, 5:09:38 AM (12 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
fb987e8
Parents:
1a89c3d
git-author:
Chris Johns <chrisj@…> (05/08/18 05:09:38)
git-committer:
Chris Johns <chrisj@…> (06/15/18 05:54:25)
Message:

rtemstoolkit: Add libdwarf C++ interface.

Provide a C++ interface to libdwarf to:

  • Manage DWARF debug data
  • Manage CU
  • Manage DIE
  • Handle CU line addresses
  • Handle CU source files

Update #3417

Location:
rtemstoolkit
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • rtemstoolkit/rld-elf.cpp

    r1a89c3d r558cab8  
    422422    file::file ()
    423423      : fd_ (-1),
     424        refs (0),
    424425        archive (false),
    425426        writable (false),
     
    436437    {
    437438      end ();
     439    }
     440
     441    void
     442    file::reference_obtain ()
     443    {
     444      ++refs;
     445    }
     446
     447    void
     448    file::reference_release ()
     449    {
     450      --refs;
    438451    }
    439452
     
    552565    file::end ()
    553566    {
     567      if (refs > 0)
     568        throw rld::error ("References still held", "elf:file:end: " + name_);
     569
    554570      if (elf_)
    555571      {
  • rtemstoolkit/rld-elf.h

    r1a89c3d r558cab8  
    645645      bool is_writable () const;
    646646
     647      /**
     648       * Obtain a reference to this object. End fails while references are
     649       * held.
     650       */
     651      void reference_obtain ();
     652
     653      /**
     654       * Release the reference to this object.
     655       */
     656      void reference_release ();
     657
    647658    private:
    648659
     
    698709
    699710      int                  fd_;        //< The file handle.
     711      int                  refs;       //< The reference count.
    700712      std::string          name_;      //< The name of the file.
    701713      bool                 archive;    //< The ELF file is part of an archive.
  • rtemstoolkit/wscript

    r1a89c3d r558cab8  
    7171    conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic']
    7272    conf['optflags'] = bld.env.C_OPTS
    73     conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
    74     conf['cxxflags'] = ['-pipe', '-g'] + conf['optflags']
     73    conf['cflags'] = list(set(['-pipe', '-g'] + conf['optflags']))
     74    conf['cxxflags'] = list(set(['-pipe', '-g', '-std=c++11'] + conf['optflags']))
    7575    conf['linkflags'] = ['-g']
    7676
     
    9191                  'rld-compression.cpp',
    9292                  'rld-config.cpp',
     93                  'rld-dwarf.cpp',
    9394                  'rld-elf.cpp',
    9495                  'rld-files.cpp',
Note: See TracChangeset for help on using the changeset viewer.