Example #1
0
static void ATTRIBUTE_PRINTF_2
db (int db_code, char * msg_format, ...)
{
  if (db_accepted_codes () & db_code)
    {
      va_list msg_args;

      db_indent (DB_INDENT_OUTPUT);

      va_start (msg_args, msg_format);
      vfprintf (stderr, msg_format, msg_args);
      va_end (msg_args);
    }
}
Example #2
0
static void
db_region_for (region_descriptor *region, _Unwind_Ptr ip)
{
  if (! (db_accepted_codes () & DB_REGIONS))
    return;

  db (DB_REGIONS, "For ip @ %p => ", (void *)ip);

  if (region->lsda)
    db (DB_REGIONS, "lsda @ %p", (void *)region->lsda);
  else
    db (DB_REGIONS, "no lsda");

  db (DB_REGIONS, "\n");
}
Example #3
0
static void
db_phases (int phases)
{
  const phase_descriptor *a = phase_descriptors;

  if (! (db_accepted_codes() & DB_PHASES))
    return;

  db (DB_PHASES, "\n");

  for (; a->description != 0; a++)
    if (phases & a->phase)
      db (DB_PHASES, "%s ", a->description);

  db (DB_PHASES, " :\n");
}
static void
db_region_for (region_descriptor *region, _Unwind_Context *uw_context)
{
  _Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;

  if (! (db_accepted_codes () & DB_REGIONS))
    return;

  db (DB_REGIONS, "For ip @ 0x%08x => ", ip);

  if (region->lsda)
    db (DB_REGIONS, "lsda @ 0x%x", region->lsda);
  else
    db (DB_REGIONS, "no lsda");

  db (DB_REGIONS, "\n");
}
Example #5
0
static void
db_region_for (region_descriptor *region, _Unwind_Context *uw_context)
{
  _Unwind_Ptr ip;

  if (! (db_accepted_codes () & DB_REGIONS))
    return;

  ip = get_ip_from_context (uw_context);

  db (DB_REGIONS, "For ip @ %p => ", (void *)ip);

  if (region->lsda)
    db (DB_REGIONS, "lsda @ %p", (void *)region->lsda);
  else
    db (DB_REGIONS, "no lsda");

  db (DB_REGIONS, "\n");
}
Example #6
0
static void
db_region_for (region_descriptor *region, _Unwind_Context *uw_context)
{
  int ip_before_insn = 0;
#ifdef HAVE_GETIPINFO
  _Unwind_Ptr ip = _Unwind_GetIPInfo (uw_context, &ip_before_insn);
#else
  _Unwind_Ptr ip = _Unwind_GetIP (uw_context);
#endif
  if (!ip_before_insn)
    ip--;

  if (! (db_accepted_codes () & DB_REGIONS))
    return;

  db (DB_REGIONS, "For ip @ 0x%08x => ", ip);

  if (region->lsda)
    db (DB_REGIONS, "lsda @ 0x%x", region->lsda);
  else
    db (DB_REGIONS, "no lsda");

  db (DB_REGIONS, "\n");
}