void show_raman_active(struct model_pak *model) { if (!model) return; printf("------------------------------------------\n"); printf(" mode # | frequency | Raman intensity\n"); printf("------------------------------------------\n"); show_active(model->raman_list, model); }
void show_ir_active(struct model_pak *model) { if (!model) return; printf("----------------------------------------\n"); printf(" mode # | frequency | IR intensity\n"); printf("----------------------------------------\n"); show_active(model->ir_list, model); }
static void show_redir_state ( HChar* who ) { TopSpec* ts; Spec* sp; Active* act; VG_(message)(Vg_DebugMsg, "<<"); VG_(message)(Vg_DebugMsg, " ------ REDIR STATE %s ------", who); for (ts = topSpecs; ts; ts = ts->next) { VG_(message)(Vg_DebugMsg, " TOPSPECS of soname %s", ts->seginfo ? (HChar*)VG_(seginfo_soname)(ts->seginfo) : "(hardwired)" ); for (sp = ts->specs; sp; sp = sp->next) show_spec(" ", sp); } VG_(message)(Vg_DebugMsg, " ------ ACTIVE ------"); VG_(OSet_ResetIter)( activeSet ); while ( (act = VG_(OSet_Next)(activeSet)) ) { show_active(" ", act); } VG_(message)(Vg_DebugMsg, ">>"); }
/* Add an act (passed by value; is copied here) and deal with conflicting bindings. */ static void maybe_add_active ( Active act ) { HChar* what = NULL; Active* old; /* Complain and ignore manifestly bogus 'from' addresses. Kludge: because this can get called befor the trampoline area (a bunch of magic 'to' addresses) has its ownership changed from V to C, we can't check the 'to' address similarly. Sigh. amd64-linux hack: the vsysinfo pages appear to have no permissions ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 so skip the check for them. */ if (!is_plausible_guest_addr(act.from_addr) # if defined(VGP_amd64_linux) && act.from_addr != 0xFFFFFFFFFF600000ULL && act.from_addr != 0xFFFFFFFFFF600400ULL # endif ) { what = "redirection from-address is in non-executable area"; goto bad; } old = VG_(OSet_Lookup)( activeSet, &act.from_addr ); if (old) { /* Dodgy. Conflicting binding. */ vg_assert(old->from_addr == act.from_addr); if (old->to_addr != act.to_addr) { /* we have to ignore it -- otherwise activeSet would contain conflicting bindings. */ what = "new redirection conflicts with existing -- ignoring it"; goto bad; } else { /* This appears to be a duplicate of an existing binding. Safe(ish) -- ignore. */ /* XXXXXXXXXXX COMPLAIN if new and old parents differ */ } } else { Active* a = VG_(OSet_AllocNode)(activeSet, sizeof(Active)); vg_assert(a); *a = act; VG_(OSet_Insert)(activeSet, a); /* Now that a new from->to redirection is in force, we need to get rid of any translations intersecting 'from' in order that they get redirected to 'to'. So discard them. Just for paranoia (but, I believe, unnecessarily), discard 'to' as well. */ VG_(discard_translations)( (Addr64)act.from_addr, 1, "redir_new_SegInfo(from_addr)"); VG_(discard_translations)( (Addr64)act.to_addr, 1, "redir_new_SegInfo(to_addr)"); } return; bad: vg_assert(what); if (VG_(clo_verbosity) > 1) { VG_(message)(Vg_UserMsg, "WARNING: %s", what); show_active( " new: ", &act); } }