From owner-freebsd-current Thu Feb 7 18: 0:42 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 2E24937B426 for ; Thu, 7 Feb 2002 18:00:26 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020208020025.RMGW2951.rwcrmhc53.attbi.com@InterJet.elischer.org>; Fri, 8 Feb 2002 02:00:25 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA98980; Thu, 7 Feb 2002 17:50:58 -0800 (PST) Date: Thu, 7 Feb 2002 17:50:56 -0800 (PST) From: Julian Elischer To: Andrew Gallatin Cc: Jake Burkholder , current@FreeBSD.ORG Subject: Re: Non 386 testers REALLY NEEDED In-Reply-To: <15459.11501.360105.244279@grasshopper.cs.duke.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ok here's the fix that went into libkvm http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libkvm/kvm_proc.c.diff?r1=1.41&r2=1.42 basically you have to map in the thread structure separatly to the proc structure, using the first entry in the linked list of threads. Obviously this only works for a process with one thread but the program will need more help than that to handle more than one thread. kvread and KREAD are basically the same thing. basically you have read in teh thread structure and then read the pcb from there.. On Thu, 7 Feb 2002, Andrew Gallatin wrote: > > Julian Elischer writes: > > > > > > I've committed both the kernel diff and a libkvm diff that seems to work > > for me here. > > > > can you check it with the new -current again ? > > World breakage on alpha: > > usr/src/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c: In function `set_proc_cmd': > /usr/src/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c:393: structure has no member named `p_thread' > *** Error code 1 > > Stop in /usr/src/gnu/usr.bin/binutils/gdb. > *** Error code 1 > > > The following diff fixes it, but isn't likely to be correct. How > should kvm be finding the pcb based on the process? > > Drew > > > Index: kvm-fbsd.c > =================================================================== > RCS file: /home/ncvs/src/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c,v > retrieving revision 1.6 > diff -u -r1.6 kvm-fbsd.c > --- kvm-fbsd.c 13 Oct 2001 04:38:46 -0000 1.6 > +++ kvm-fbsd.c 8 Feb 2002 01:39:32 -0000 > @@ -390,7 +390,7 @@ > addr = (CORE_ADDR)parse_and_eval_address(arg); > > /* Read the PCB address in proc structure. */ > - addr += (int) &((struct proc *)0)->p_thread.td_pcb; > + addr += (int) &((struct proc *)0)->p_xxthread.td_pcb; > if (kvread(addr, &val)) > error("cannot read pcb ptr"); > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message