Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: pedro@codesourcery.com
Cc: gdb-patches@sourceware.org
Subject: Re: bsd-kvm target, always a thread
Date: Sat, 09 Aug 2008 08:17:00 -0000	[thread overview]
Message-ID: <200808090815.m798FUhj011086@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <200808080420.05897.pedro@codesourcery.com> (message from Pedro 	Alves on Fri, 8 Aug 2008 04:20:04 +0100)

> From: Pedro Alves <pedro@codesourcery.com>
> Date: Fri, 8 Aug 2008 04:20:04 +0100
> 
> Hi,
> 
> This patches makes the bsd-kvm target register a main thread.
> 
> I've "tested" this on a x86 OpenBSD-4.3 VM, but I'm not qualified
> to do much more openbsd kernel debugging other than:
> 
>  (gdb) tar kvm
>  #0  0x00000006 in ?? ()
>  (gdb) info threads
>  * 1 <kvm>  0x00000006 in ?? ()
> 
> B.T.W, with GDB 6.3, which came with the distro I always get:
> 
>  (gdb) tar kvm
>  #0  0xd034ee05 in ?? ()
> 
> With HEAD I always get 0x00000006.
> 
> Is this difference expected?  Related to the recent change to
> build on 4.3?

Hmm, for some reason the .sf_eip got lost when I committed that code.
Fixed by the attached diff, which I committed.

(I'll send a seperate reply to discuss your diff).

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
	the %eip register.

Index: i386obsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386obsd-nat.c,v
retrieving revision 1.12
diff -u -p -r1.12 i386obsd-nat.c
--- i386obsd-nat.c 6 Aug 2008 19:56:20 -0000 1.12
+++ i386obsd-nat.c 9 Aug 2008 07:58:54 -0000
@@ -78,7 +78,7 @@ i386obsd_supply_pcb (struct regcache *re
       pcb->pcb_esp = pcb->pcb_ebp;
       pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4);
       sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4);
-      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf);
+      regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
     }
 
   regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);


  reply	other threads:[~2008-08-09  8:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  3:20 Pedro Alves
2008-08-09  8:17 ` Mark Kettenis [this message]
2008-08-09  8:34 ` Mark Kettenis
2008-08-09 11:28   ` Pedro Alves
2008-08-09 12:13     ` Mark Kettenis
2008-08-09 14:31       ` Pedro Alves
2008-08-10 15:56         ` Mark Kettenis
2008-08-10 17:34           ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808090815.m798FUhj011086@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox