libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::symbol::symbol ( const symbol src)

Object copy constructor.

Parameters
[in]srcthe source object
Exceptions
std::bad_alloc

Definition at line 39 of file symbol.cpp.

References likely, and m_name.

39  :
40 m_addr(src.m_addr),
41 m_name(NULL)
42 {
43  i8 *buf = src.m_name;
44  if ( likely(buf != NULL) ) {
45  m_name = new i8[strlen(buf) + 1];
46  strcpy(m_name, buf);
47  }
48 }
char i8
8-bit signed integer
Definition: config.hpp:72
mem_addr_t m_addr
Symbol address.
Definition: symbol.hpp:23
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344
i8 * m_name
Symbol name.
Definition: symbol.hpp:25