クラス toppers::nm_symbol

"nm"コマンドで得られるシンボルテーブルを扱うためのクラス [詳細]

#include "toppers/nm_symbol.hpp"

toppers::nm_symbolのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

 nm_symbol ()
 デフォルトコンストラクタ
 nm_symbol (std::istream &istr)
 コンストラクタ
void load (std::istream &istr)
 シンボルテーブルのロード
const entry find (const std::string &symbol) const
 シンボルの探索

構成

struct  entry
 アドレスとタイプ情報を格納する構造体 [詳細]

説明

"nm"コマンドで得られるシンボルテーブルを扱うためのクラス

参照:
nm_symbol::entry

nm_symbol.hpp58 行で定義されています。


コンストラクタとデストラクタ

toppers::nm_symbol::nm_symbol std::istream &  istr  )  [inline, explicit]
 

コンストラクタ

引数:
istr 入力ストリーム

nm_symbol.hpp85 行で定義されています。

参照先 load().

00085 { load( istr ); }

関数の呼び出しグラフ:


関数

const nm_symbol::entry toppers::nm_symbol::find const std::string &  symbol  )  const
 

シンボルの探索

引数:
symbol 探索するシンボル文字列
戻り値:
シンボルに対応するエントリを返す

nm_symbol.cpp84 行で定義されています。

参照元 toppers::itron::jsp::task_policy::check()toppers::itron::jsp::interrupt_policy::check()toppers::itron::jsp::exception_policy::check()toppers::itron::jsp::cyclic_policy::check().

00085   {
00086     std::map<std::string, entry>::const_iterator iter( symbol_map_.find( symbol ) );
00087     entry e = { 0, -1 };
00088     if ( iter != symbol_map_.end() )
00089     {
00090       e = iter->second;
00091     }
00092     else
00093     {
00094       iter = symbol_map_.find( "_" + symbol );  // 識別子に'_'が付加される場合に対応
00095       if ( iter != symbol_map_.end() )
00096       {
00097         e = iter->second;
00098       }
00099     }
00100     return e;
00101   }

void toppers::nm_symbol::load std::istream &  istr  ) 
 

シンボルテーブルのロード

引数:
istr 入力ストリーム

nm_symbol.cpp52 行で定義されています。

参照元 nm_symbol().

00053   {
00054     while ( istr )
00055     {
00056       std::string buf;
00057       std::getline( istr, buf );
00058       std::istringstream isstr( buf );
00059 
00060       unsigned long address = 0;
00061       char type;
00062       std::string symbol;
00063       if ( !std::isspace( buf[0] ) )
00064       {
00065         isstr >> std::hex >> address;
00066       }
00067       isstr >> type >> symbol;
00068 
00069       if ( !symbol.empty() )
00070       {
00071         entry e;
00072         e.address = address;
00073         e.type = static_cast<unsigned char>( type );
00074         symbol_map_[symbol] = e;
00075       }
00076     }
00077   }


このクラスの説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:03 2006 に Doxygen によって生成されました。