Back to index

glibc  2.9
Defines | Functions | Variables
td_symbol_list.c File Reference
#include <assert.h>
#include <gnu/lib-names.h>
#include "thread_dbP.h"
#include "structs.def"

Go to the source code of this file.

Defines

#define DOT   /* No prefix. */
#define DB_STRUCT(type)   [SYM_SIZEOF_##type] = "_thread_db_sizeof_" #type,
#define DB_STRUCT_FIELD(type, field)   [SYM_##type##_FIELD_##field] = "_thread_db_" #type "_" #field,
#define DB_SYMBOL(name)   [SYM_##name] = #name,
#define DB_FUNCTION(name)   [SYM_##name] = DOT #name,
#define DB_VARIABLE(name)

Functions

const char ** td_symbol_list (void)
ps_err_e td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr)

Variables

static const char * symbol_list_arr []

Define Documentation

#define DB_FUNCTION (   name)    [SYM_##name] = DOT #name,
#define DB_STRUCT (   type)    [SYM_SIZEOF_##type] = "_thread_db_sizeof_" #type,
#define DB_STRUCT_FIELD (   type,
  field 
)    [SYM_##type##_FIELD_##field] = "_thread_db_" #type "_" #field,
#define DB_SYMBOL (   name)    [SYM_##name] = #name,
#define DB_VARIABLE (   name)
Value:
[SYM_##name] = #name, \
  [SYM_DESC_##name] = "_thread_db_" #name,
#define DOT   /* No prefix. */

Definition at line 29 of file td_symbol_list.c.


Function Documentation

ps_err_e td_lookup ( struct ps_prochandle *  ps,
int  idx,
psaddr_t sym_addr 
)

Definition at line 69 of file td_symbol_list.c.

{
  ps_err_e result;
  assert (idx >= 0 && idx < SYM_NUM_MESSAGES);
  result = ps_pglobal_lookup (ps, LIBPTHREAD_SO, symbol_list_arr[idx],
                           sym_addr);

#ifdef HAVE_ASM_GLOBAL_DOT_NAME
  /* For PowerPC, 64-bit uses dot symbols but 32-bit does not.
     We could be a 64-bit libthread_db debugging a 32-bit libpthread.  */
  if (result == PS_NOSYM && symbol_list_arr[idx][0] == '.')
    result = ps_pglobal_lookup (ps, LIBPTHREAD_SO, &symbol_list_arr[idx][1],
                            sym_addr);
#endif

  return result;
}

Here is the call graph for this function:

const char** td_symbol_list ( void  )

Definition at line 62 of file td_symbol_list.c.

{
  return symbol_list_arr;
}

Variable Documentation

const char* symbol_list_arr[] [static]

Definition at line 32 of file td_symbol_list.c.