| 228 | } |
| 229 | |
| 230 | bool |
| 231 | db_value_of_name_pcpu(const char *name, db_expr_t *valuep) |
| 232 | { |
| 233 | static char tmp[256]; |
| 234 | db_expr_t value; |
| 235 | c_db_sym_t sym; |
| 236 | int cpu; |
| 237 | |
| 238 | if (db_cpu != -1) |
| 239 | cpu = db_cpu; |
| 240 | else |
| 241 | cpu = curcpu; |
| 242 | snprintf(tmp, sizeof(tmp), "pcpu_entry_%s", name); |
| 243 | sym = db_lookup(tmp); |
| 244 | if (sym == C_DB_SYM_NULL) |
| 245 | return (false); |
| 246 | db_symbol_values(sym, &name, &value); |
| 247 | if (value < DPCPU_START || value >= DPCPU_STOP) |
| 248 | return (false); |
| 249 | *valuep = (db_expr_t)((uintptr_t)value + dpcpu_off[cpu]); |
| 250 | return (true); |
| 251 | } |
| 252 | |
| 253 | bool |
| 254 | db_value_of_name_vnet(const char *name, db_expr_t *valuep) |
no test coverage detected