mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Remove the warnx() from kgdb_lookup() so that we don't emit a warning about
optional symbols that are missing (e.g. kgdb complains about _stoppcbs and _stopped_cpus on UP kernels). Instead, callers that really want their symbols to be present now do explicitly warnx() about the missing symbol.
This commit is contained in:
parent
4d6cae0d4d
commit
fea3c2c5c7
2 changed files with 10 additions and 6 deletions
|
|
@ -60,10 +60,8 @@ kgdb_lookup(const char *sym)
|
|||
|
||||
nl[0].n_name = (char *)(uintptr_t)sym;
|
||||
nl[1].n_name = NULL;
|
||||
if (kvm_nlist(kvm, nl) != 0) {
|
||||
warnx("kvm_nlist(%s): %s", sym, kvm_geterr(kvm));
|
||||
if (kvm_nlist(kvm, nl) != 0)
|
||||
return (0);
|
||||
}
|
||||
return (nl[0].n_value);
|
||||
}
|
||||
|
||||
|
|
@ -82,13 +80,17 @@ kgdb_thr_init(void)
|
|||
uintptr_t addr, paddr;
|
||||
|
||||
addr = kgdb_lookup("_allproc");
|
||||
if (addr == 0)
|
||||
if (addr == 0) {
|
||||
warnx("kvm_nlist(_allproc): %s", kvm_geterr(kvm));
|
||||
return (NULL);
|
||||
}
|
||||
kvm_read(kvm, addr, &paddr, sizeof(paddr));
|
||||
|
||||
dumppcb = kgdb_lookup("_dumppcb");
|
||||
if (dumppcb == 0)
|
||||
if (dumppcb == 0) {
|
||||
warnx("kvm_nlist(_dumppcb): %s", kvm_geterr(kvm));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
addr = kgdb_lookup("_dumptid");
|
||||
if (addr != 0)
|
||||
|
|
|
|||
|
|
@ -141,8 +141,10 @@ kgdb_trgt_fetch_tss(void)
|
|||
*/
|
||||
if (trunc_page(tss) == 0xffc00000) {
|
||||
addr = kgdb_lookup("_cpu0prvpage");
|
||||
if (addr == 0)
|
||||
if (addr == 0) {
|
||||
warnx("kvm_nlist(_cpu0prvpage): %s", kvm_geterr(kvm));
|
||||
return (0);
|
||||
}
|
||||
if (kvm_read(kvm, addr, &cpu0prvpage, sizeof(cpu0prvpage)) !=
|
||||
sizeof(cpu0prvpage)) {
|
||||
warnx("kvm_read: %s", kvm_geterr(kvm));
|
||||
|
|
|
|||
Loading…
Reference in a new issue