svn commit: r203823 - head/gnu/usr.bin/gdb/kgdb

Andriy Gapon avg at FreeBSD.org
Sat Feb 13 11:47:05 UTC 2010


Author: avg
Date: Sat Feb 13 11:47:04 2010
New Revision: 203823
URL: http://svn.freebsd.org/changeset/base/203823

Log:
  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

Modified:
  head/gnu/usr.bin/gdb/kgdb/kthr.c

Modified: head/gnu/usr.bin/gdb/kgdb/kthr.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/kthr.c	Sat Feb 13 11:34:25 2010	(r203822)
+++ head/gnu/usr.bin/gdb/kgdb/kthr.c	Sat Feb 13 11:47:04 2010	(r203823)
@@ -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)


More information about the svn-src-all mailing list