summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-02-13 11:47:04 +0000
committeravg <avg@FreeBSD.org>2010-02-13 11:47:04 +0000
commit8e8855f633781f8aff8535ed7ca2c522628b5cce (patch)
treef879afc35d3e6d74ae45776f8531aec21e396baa /gnu
parent5fa4d4f819509c73a0f59409d591fb3b5fbe231f (diff)
downloadFreeBSD-src-8e8855f633781f8aff8535ed7ca2c522628b5cce.zip
FreeBSD-src-8e8855f633781f8aff8535ed7ca2c522628b5cce.tar.gz
kgdb: initialize n_type field of nlist entry for kvm_nlist call
kvm_nlist skips lookup for entries that have n_type != N_UNDF. N_UNDF happens to be zero, so n_type typically has a correct value by accident, but not always. Note: jhb has a patch that replaces kvm_nlist use with direct gdb parsing. MFC after: 5 days X-MFC-Note: unless jhb commits kvm_nlist => kgdb_parse change
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gdb/kgdb/kthr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/kthr.c b/gnu/usr.bin/gdb/kgdb/kthr.c
index 7e5b1c0..1ab66eb 100644
--- a/gnu/usr.bin/gdb/kgdb/kthr.c
+++ b/gnu/usr.bin/gdb/kgdb/kthr.c
@@ -58,6 +58,7 @@ kgdb_lookup(const char *sym)
{
struct nlist nl[2];
+ nl[0].n_type = N_UNDF;
nl[0].n_name = (char *)(uintptr_t)sym;
nl[1].n_name = NULL;
if (kvm_nlist(kvm, nl) != 0)
OpenPOWER on IntegriCloud